need bash help for multiple line test



Hi All,

In bash script, if I have a variable that looks like

echo $A
/dev/sda2
/dev/sda2
/dev/sdb1
/dev/sdb3

and I want to test each one for the existence of
a type of partition, stopping at the first instance
of what I want, how would I write such a thing?
Is there a way to do readline on a variable?

Many thanks,
-T
.



Relevant Pages

  • Re: soft-coding a script
    ... $ cat nikon_bash3.sh ... I invoke it at the end of the nikon bash script. ... echo "Change files ownership" ... the associated mtime won't change, ...
    (comp.unix.programmer)
  • Re: Database Bash Scripting?
    ... >>written in bash script. ... to the psql client and a few echo statements. ... put whatever you want in the body of the HTML. ...
    (comp.os.linux.misc)
  • My Bash script is ucked up.. I really need help!!
    ... in spite of numerous bash script tutorials ... echo 'You must enter an option: ... lastMod lastChange ioblock << $ ... lastMod lastChange ioblock << THROW $ ...
    (comp.os.linux.misc)
  • My Bash script is ucked up.. I really need help!!
    ... in spite of numerous bash script tutorials ... echo 'You must enter an option: ... lastMod lastChange ioblock << $ ... lastMod lastChange ioblock << THROW $ ...
    (comp.unix.shell)
  • Re: Bash script via inetd = no joy
    ... I wrote a Bash script in Linux using 'read' and 'echo'. ... the Win2k telnet client and from the Linux telnet client. ...
    (comp.unix.shell)