Filtering (comment) lines with # in column one using a Bash script
From: Phisherman (nobody_at_noone.com)
Date: 03/28/04
- Next message: Scarletdown: "Re: The True Linux Zealot Exposed!! (The Experiment has ended)."
- Previous message: Daeron: "Re: The True Linux Zealot Exposed!! (The Experiment has ended)."
- Next in thread: Chris F.A. Johnson: "Re: Filtering (comment) lines with # in column one using a Bash script"
- Reply: Chris F.A. Johnson: "Re: Filtering (comment) lines with # in column one using a Bash script"
- Reply: Bit Twister: "Re: Filtering (comment) lines with # in column one using a Bash script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 28 Mar 2004 20:24:21 GMT
Is there an easy way to view all the lines of a file, except the lines
that begin with a pound sign (#)? I thought about using the commands
"less," "grep," and a pipe but I'm not sure about the proper
expression needed in grep.
What I want to do is view the contents of the file squid.conf without
all the comments. I know I could write a C program to do this, but
I'd rather use the Bash shell script.
Thanks
- Next message: Scarletdown: "Re: The True Linux Zealot Exposed!! (The Experiment has ended)."
- Previous message: Daeron: "Re: The True Linux Zealot Exposed!! (The Experiment has ended)."
- Next in thread: Chris F.A. Johnson: "Re: Filtering (comment) lines with # in column one using a Bash script"
- Reply: Chris F.A. Johnson: "Re: Filtering (comment) lines with # in column one using a Bash script"
- Reply: Bit Twister: "Re: Filtering (comment) lines with # in column one using a Bash script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|