| OS X - Apps and Games Discussion of applications and games available for Mac OS X. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Feb 03, 2008
Posts: 125
![]() |
I'm learning about the read command and wrote this little script to read data from a file:
Code:
readfile()
{
while read variable; do
echo $variable
done
}
readfile < File.txt
Also, what does the statment if [ $variable ] mean? Does it mean 'if the value of variable exists....'? File.txt only consists of the words red, blue and green. |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Show Item Info | inflexion | OS X - Operating System | 15 | 10-24-2005 10:34 PM |
| Shell script question | Niwrad | OS X - Development and Darwin | 14 | 06-28-2005 04:58 PM |
| Terminal Help | rs2sensen | OS X - Apps and Games | 1 | 04-25-2005 10:52 PM |
| Shell Script on Desktop | starrin | OS X - Operating System | 2 | 07-28-2004 11:25 AM |
| looking for a terminal emulator and command shell in Mac OSX | CandiMarie | OS X - Operating System | 9 | 03-05-2004 03:53 PM |
All times are GMT -4. The time now is 09:49 AM.
Powered by vBulletin