[CentOS] script question
tibyke at tibyke.hu
Wed Oct 15 14:54:24 UTC 2008
> I am trying to create a script that takes an entire file,
> drops the first 19 characters from each line and creates a new file.
> I am missing something easy but I am not seeing it.
> I tried the script below but did not work.
> rm output.txt
> cat test.txt | \
> while read LINE
> newline=`echo $LINE | cut -f 19-`
> echo $newline >> output.txt
> test.txt is below 10-Oct-08 08:14 am 10
why not simply
cut -b10- foo > bar
More information about the CentOS