aboutsummaryrefslogtreecommitdiffhomepage
path: root/snippets/bash_read_from_pipe
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-12-03 17:33:13 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-12-03 17:33:13 +0800
commitd1b57c1d68fa60a4a67c208f29b739ef0f20d5c5 (patch)
treecb7d281af1ae22efe00a2f10394d6680aab9dfbf /snippets/bash_read_from_pipe
parent152ecc894dd24cac6934a10f26f0fcce8445c2ea (diff)
Update
Diffstat (limited to 'snippets/bash_read_from_pipe')
-rw-r--r--snippets/bash_read_from_pipe4
1 files changed, 4 insertions, 0 deletions
diff --git a/snippets/bash_read_from_pipe b/snippets/bash_read_from_pipe
new file mode 100644
index 0000000..47d22b8
--- /dev/null
+++ b/snippets/bash_read_from_pipe
@@ -0,0 +1,4 @@
1shopt -s lastpipe; set +m;
2
3echo bar | read foo
4echo $foo