Quoting Chris G Haravata <[EMAIL PROTECTED]>:
> haba ng subject line ano? :)
Not so, if you ask me. It still fits on my screen. :)
> anyway, the problem is this: i need to create a script which will
> automatically create user home directories from a file. but i need to read
> the file first from within the script. the file looks like the ff:
>
> /home/2000/abc-123455
> /home/1995/def-678901
> /home/2001/ghi-234567
> <etc until 1125 lines later>
Assuming that you have each of these on a line by itself in the file the
following will do:
for i in `cat /some/file`; do mkdir "$i"; done;
Take note that those are not single quotes surrounding cat but that one under
the tilde which tells bash to get the output of that command. You can also pipe
the output to awk or grep or whatever to do some limitting. :)
--> Jijo
--
Federico Sevilla III :: [EMAIL PROTECTED]
Network Administrator :: The Leather Collection, Inc.
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]