diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-12-03 17:33:13 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-12-03 17:33:13 +0800 |
commit | d1b57c1d68fa60a4a67c208f29b739ef0f20d5c5 (patch) | |
tree | cb7d281af1ae22efe00a2f10394d6680aab9dfbf /snippets/bash_read_from_pipe | |
parent | 152ecc894dd24cac6934a10f26f0fcce8445c2ea (diff) |
Update
Diffstat (limited to 'snippets/bash_read_from_pipe')
-rw-r--r-- | snippets/bash_read_from_pipe | 4 |
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 @@ | |||
1 | shopt -s lastpipe; set +m; | ||
2 | |||
3 | echo bar | read foo | ||
4 | echo $foo | ||