summaryrefslogtreecommitdiffhomepage
path: root/bash.html.markdown
diff options
context:
space:
mode:
authorGeoff Liu <cangming.liu@gmail.com>2015-04-23 15:55:22 -0600
committerGeoff Liu <cangming.liu@gmail.com>2015-04-23 15:55:22 -0600
commit50d59adb720153cb87a81f3560e5a27b282ab961 (patch)
tree1c9fdef566ae41f14779127649969b1b9a76f758 /bash.html.markdown
parent04eed19763b7aad50318212f96e98860a38735af (diff)
parent19f6739cbaa06b6b40b835115a0361f5e77bd0e0 (diff)
Merge pull request #1056 from srirams6/bashlinefix
[bash/en] Fixed overflowing line.
Diffstat (limited to 'bash.html.markdown')
-rw-r--r--bash.html.markdown6
1 files changed, 4 insertions, 2 deletions
diff --git a/bash.html.markdown b/bash.html.markdown
index 3b163638..35bed9a2 100644
--- a/bash.html.markdown
+++ b/bash.html.markdown
@@ -235,11 +235,13 @@ uniq -d file.txt
cut -d ',' -f 1 file.txt
# replaces every occurrence of 'okay' with 'great' in file.txt, (regex compatible)
sed -i 's/okay/great/g' file.txt
-# print to stdout all lines of file.txt which match some regex, the example prints lines which begin with "foo" and end in "bar"
+# print to stdout all lines of file.txt which match some regex
+# The example prints lines which begin with "foo" and end in "bar"
grep "^foo.*bar$" file.txt
# pass the option "-c" to instead print the number of lines matching the regex
grep -c "^foo.*bar$" file.txt
-# if you literally want to search for the string, and not the regex, use fgrep (or grep -F)
+# if you literally want to search for the string,
+# and not the regex, use fgrep (or grep -F)
fgrep "^foo.*bar$" file.txt