This is strange...

Michael "Ford" Ditto ditto at cbmvax.UUCP
Fri Dec 23 11:59:48 AEST 1988


In article <1652 at ektools.UUCP> mcapron at ektools.UUCP (M. Capron) writes:
>CODE A: This works.
>incs=`egrep '^#[         ]*include[     ]*"' $i | awk '{printf "%s ", $2}'`
>incs=`echo "$incs" | sed 's/"//g'`
>
>CODE B: This does not work.
>incs=`egrep '^#[         ]*include[     ]*"' $i | awk '{printf "%s ", $2}' | sed 's/"//g'`
>
>With CODE B, $incs comes out to be nil.

echo outputs a newline after its arguments, while your awk program won't.
sed only processes lines that are properly newline-terminated.
-- 
					-=] Ford [=-

"The number of Unix installations	(In Real Life:  Mike Ditto)
has grown to 10, with more expected."	ford at kenobi.cts.com
- The Unix Programmer's Manual,		...!sdcsvax!crash!elgar!ford
  2nd Edition, June, 1972.		ditto at cbmvax.commodore.com



More information about the Comp.unix.wizards mailing list