From 76d0ea3113933da30c1251e8c8b7016a677dfa42 Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 7 Nov 2024 22:05:24 +0000 Subject: deploy: 8c7f8b75acf4eb4fc0e8d606cffa4bcdae865606 --- cli/rev.html | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 cli/rev.html (limited to 'cli/rev.html') diff --git a/cli/rev.html b/cli/rev.html new file mode 100644 index 0000000..bbca9b0 --- /dev/null +++ b/cli/rev.html @@ -0,0 +1,223 @@ + + + + + + rev - Notes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+
+

rev(1)

+
# Reverse each line of file(s), character by character.
+rev FILE [FILE]
+
+echo -e '123\nabc' | rev
+# 321
+# cba
+
+

Example: remove the last 2 tokens with unknown length

+
# If the number of tokens in a line is unkown but we want to remove the last 2
+# tokens we can use rev(1).
+echo 'aa bb cc dd' | rev | cut -d ' ' -f3- | rev
+# aa bb
+
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + +
+ + -- cgit v1.2.3