[Tutor] Newbie Help on reading files.

SA sarmstrong13@mac.com
Fri, 26 Jul 2002 11:47:38 -0500


Hi Everyone-

I would like to read a text file that has multiple lines like the following:

# filewho: to show file system usage (to see what is causing disk activity)
alias filewho 'sudo fs_usage'


I would like it to ignore all lines beginning with pound. I would then like
it to it to break up the alias lines ,there are only three items, into:
alias
command
''

I would then do work on each of the three items in the alias line
individually.


Would I need to use the re module or is there a better way to do this?


Thanks.
SA


-- 
"I can do everything on my Mac I used to on my PC. Plus a lot more ..."
-Me