RE: bash question



Il giorno mer, 31/10/2007 alle 09.28 -0400, Miner, Jonathan W (CSC) (US
SSA) ha scritto:

By pipe'ing the commands together, you cause the while loop
to be executed in a subshell. Change your script to be:

done << _EOF_
a a a
b b b
c c c
_EOF_

echo $i

Thanks ... but my original script is someone like this:

ls dir/|
while read d
do
...
done

then I have change it so:

ls dir > /tmp/f.tmp
while read d
do
....
done < /tmp/f.tmp
rm -f /tmp/f.tmp

Now all work fine!

Thanks!!

--
Dario Lesca <d.lesca@xxxxxxxxxx>

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: newbie script queries
    ... I would like to generate afilename with the dat in it, ... will be called at the start of each script and then the script will use ... echo $DK ... in the subshell and are lost when this shell exits. ...
    (comp.unix.programmer)
  • Re: bash question
    ... SSA) ha scritto: ... to be executed in a subshell. ... Change your script to be: ...
    (Fedora)
  • Re: interesting race condition problem with processes running in background
    ... If the wait is placed in a subshell or script, ... How do you call subshell, ... sleep 4 & ... echo Done subshell ...
    (comp.unix.shell)
  • Re: [Full-disclosure] reduction of brute force login attempts via SSHthrough iptables --
    ... Anyhow its no problem at all to modify, so if you dont like it, just dont use it. ... on a lame script like this as long as it WORKS and is not insecure. ... echo "~ sorting out ip by ip" ... # echo "not enough failed logins, probably no attack from: ...
    (Full-Disclosure)
  • Ripping Tapes with Linux--How To
    ... the full script is located in the BASH ... My tape player is a portable style journalist's recorder from the ... The most irritating part of the recording process was setting the ... echo Starting de-noise procedure to file $TMP1 ...
    (comp.os.linux.misc)