Re: Grep a file
this might work: grep -v '^\;' originalfile newfile -g On 17/01/07, Joshua Lewis [EMAIL PROTECTED] wrote: I have a config file that uses ; as a comment character. Unfortunately there are s many comments I can't read the options that have been enabled. Can I use grep or another tool to pull all the lines in this file that do not start with the ; and place them into another file so I can actually read what this file is doing? Thanks for any help. Sincerely, Joshua Lewis [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- Greg Albrecht ([EMAIL PROTECTED]) An Indie, Hip Hop and IDM Podcast: The Letter G http://theletterg.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Grep a file
When I run: sudo grep -v '^\;'extentions.conf new_extentions.conf I get: -bash: new_extentions.conf: Permission denied Sincerely, Joshua Lewis [EMAIL PROTECTED] On Jan 17, 2007, at 3:15 PM, Greg Albrecht wrote: this might work: grep -v '^\;' originalfile newfile -g On 17/01/07, Joshua Lewis [EMAIL PROTECTED] wrote: I have a config file that uses ; as a comment character. Unfortunately there are s many comments I can't read the options that have been enabled. Can I use grep or another tool to pull all the lines in this file that do not start with the ; and place them into another file so I can actually read what this file is doing? Thanks for any help. Sincerely, Joshua Lewis [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions- [EMAIL PROTECTED] -- Greg Albrecht ([EMAIL PROTECTED]) An Indie, Hip Hop and IDM Podcast: The Letter G http://theletterg.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Grep a file
try to 'sudo su' first, then run the grep. -g On 17/01/07, Joshua Lewis [EMAIL PROTECTED] wrote: When I run: sudo grep -v '^\;'extentions.conf new_extentions.conf I get: -bash: new_extentions.conf: Permission denied Sincerely, Joshua Lewis [EMAIL PROTECTED] On Jan 17, 2007, at 3:15 PM, Greg Albrecht wrote: this might work: grep -v '^\;' originalfile newfile -g On 17/01/07, Joshua Lewis [EMAIL PROTECTED] wrote: I have a config file that uses ; as a comment character. Unfortunately there are s many comments I can't read the options that have been enabled. Can I use grep or another tool to pull all the lines in this file that do not start with the ; and place them into another file so I can actually read what this file is doing? Thanks for any help. Sincerely, Joshua Lewis [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- Greg Albrecht ([EMAIL PROTECTED]) An Indie, Hip Hop and IDM Podcast: The Letter G http://theletterg.org -- Greg Albrecht ([EMAIL PROTECTED]) An Indie, Hip Hop and IDM Podcast: The Letter G http://theletterg.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Grep a file
On Wednesday 17 January 2007 14:52, Joshua Lewis wrote: When I run: sudo grep -v '^\;'extentions.conf new_extentions.conf I get: -bash: new_extentions.conf: Permission denied You're running grep via sudo, but the redirection is handled by the shell, wish is still running as you. Either run sudo -s to get a root prompt, or: sudo sh -c grep -v '^\;'extentions.conf new_extentions.conf which runs your entire command line, redirection and all, as root. -- Kirk Strauser pgpqrHvsqildR.pgp Description: PGP signature
Grep a file
I have a config file that uses ; as a comment character. Unfortunately there are s many comments I can't read the options that have been enabled. Can I use grep or another tool to pull all the lines in this file that do not start with the ; and place them into another file so I can actually read what this file is doing? Thanks for any help. Sincerely, Joshua Lewis [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]