[PLUG] How to pull out a particular line from a textfile
Matt Alexander
m at netpro.to
Wed Sep 18 21:36:01 UTC 2002
I've got a file and I want to write a script to pull out particular lines
and save them in variables. Line 1 is always the email address and Line 2
is always the subject, for example.
#!/bin/bash
EMAIL=`some magical way to pull out line 1 from a textfile`
SUBJECT=`some magical way to pull out line 2 from a textfile`
I assume there's a simple command to pull out a particular line from a
textfile, but I can't think of anything right now.
Thanks,
~M
More information about the PLUG
mailing list