Re: reading whitespaces and beginning and end of line

2007-12-07 Thread Chris F.A. Johnson
On 2007-12-07, sancho1980 wrote: > > i have a script that reads lines from a file in this manner: > > cat infile | while read line You don't need cat. > do > echo "$line" >> outfile > done > > The problem I have occurs whenever there is a whitespace at the end of a > line in the input file

Re: reading whitespaces and beginning and end of line

2007-12-07 Thread Pierre Gaston
On Dec 7, 2007 12:49 PM, sancho1980 <[EMAIL PROTECTED]> wrote: > The problem I have occurs whenever there is a whitespace at the end of a > line in the input file, because this whitespace get automatically truncated > from "$line", and i dont want that..i want the whole line to go into > outfile,

Re: reading whitespaces and beginning and end of line

2007-12-07 Thread Dave Rutherford
On Dec 7, 2007 5:49 AM, sancho1980 <[EMAIL PROTECTED]> wrote: > i have a script that reads lines from a file in this manner: > > cat infile | while read line > do > echo "$line" >> outfile > done > > The problem I have occurs whenever there is a whitespace at the end of a > line in the input fi

reading whitespaces and beginning and end of line

2007-12-07 Thread sancho1980
hi i have a script that reads lines from a file in this manner: cat infile | while read line do echo "$line" >> outfile done The problem I have occurs whenever there is a whitespace at the end of a line in the input file, because this whitespace get automatically truncated from "$line", and

read -n option doesn't work right with -u

2007-12-07 Thread b_bashbug
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: i686-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/loc