Hi,

 Consider the following example:
while read line; do echo ${line}; done < somefile
 read will interpret the backslashes as escapes and remove them from the 
input. Now I could do
sed s/'\\'/'\\\\'/ somefile | while read line; do echo ${line}; done
, but this will create a subshell which is not what I want (need to set some 
global variables in the while loop).
 Is there a way that I could pipe the output from sed (or any command) into 
the while loop without creating a subshell (ie as in the first example)?

Bye,
Leonard.




-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to