diff options
| -rw-r--r-- | grepcomments | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/grepcomments b/grepcomments new file mode 100644 index 0000000..e40da26 --- /dev/null +++ b/grepcomments @@ -0,0 +1,14 @@ +#this is a file with comments +#another line +# how do I grep for uncoimmented lines? +try grep -v '^#' <file> +# that works +but grep -nv '^#' <file> is even better +# another comment + +#preceeding line was whitespace +but this is real. + +And now we can exclude whitespace or empty lines: +grep -nvE '^#|^ |^$' grepcomments +#rox |
