Re: Extracting a variable listing



On Wed, 18 Aug 2010, Jack L. Stone wrote:

The content I need will always fall beneath a row of pound signs, and there
is content above that row I don't want, like this:

bunch of rows I don't need here
############################### <--- the top of stuff needed
row1


If you want the '#' line in the output
cat YourFile | sed -n -e '/#####/,$p'

If you don't, then
cat YourFile | sed -e '1,/#####/d'

The above assumes that you will have at least 5 '#' chars on
your divider line, and never before in the file. Increase the
number '#' symbols if the above example is strictly literal.
Note the -n in the first line.

A.

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Script help needed please
    ... Jack L. Stone wrote: ... >>There is no easy solution to this, but one avenue might be to look at ... >>bandwidth throttling in an apache module. ...
    (freebsd-questions)
  • Re: zoneedit.com
    ... Jack L. Stone wrote: ... from the legacy platform to the new. ... I cannot get my login to work and they won't solve the problem. ...
    (freebsd-questions)
  • Re: Registry corrupt?
    ... Jack L. Stone wrote: ... precise path to the program. ... The error above makes it look like it's the command line that's missing, but the shell will use the command line argument when the interpreter is missing. ...
    (freebsd-questions)
  • Re: Puppies
    ... It's called the First Amendment. ... And you certainly aren't shy about using it yourself, ... I wonder if they give group rates to surgically have a whole bunch of sticks ... I have neither seen nor heard any misogynist behavior from Jack, ...
    (rec.pets.dogs.behavior)
  • Re: script help
    ... On 2/14/11 3:34 PM, Jack L. Stone wrote: ... No doubt this will be easy for those with scritping abilities. ... I have a gazillion files by the same name and each contains the same line ...
    (freebsd-questions)