"for" and line by line
From: Markus Wenke (M.Wenke_at_web.de)
Date: 10/29/04
- Next message: Chris F.A. Johnson: "Re: "for" and line by line"
- Previous message: Stephane CHAZELAS: "Re: Check for special character"
- Next in thread: Chris F.A. Johnson: "Re: "for" and line by line"
- Reply: Chris F.A. Johnson: "Re: "for" and line by line"
- Reply: Ed Morton: "Re: "for" and line by line"
- Reply: dfrench_at_mtxia.com: "Re: "for" and line by line"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 29 Oct 2004 09:27:13 +0200
Hi,
I want to write a "for"-loop in bash such like this one:
for LINE in `cat /etc/passwd`; do
echo $LINE
done
But I get every word, and not every line. and if I set "IFS=^M" like this:
IFS=[CTRL V][ENTER] for LINE in `cat /etc/passwd`; do
echo $LINE
done
the bash can't read the command.
How can I realise it?
Thanks in advance
Markus Wenke
- Next message: Chris F.A. Johnson: "Re: "for" and line by line"
- Previous message: Stephane CHAZELAS: "Re: Check for special character"
- Next in thread: Chris F.A. Johnson: "Re: "for" and line by line"
- Reply: Chris F.A. Johnson: "Re: "for" and line by line"
- Reply: Ed Morton: "Re: "for" and line by line"
- Reply: dfrench_at_mtxia.com: "Re: "for" and line by line"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|