We often test the understanding of the command line scan by asking if the following will work:
$ > /tmp/file1 2> /tmp/file2 (*)
This week, been faced with questions exploring this further. For example, notice that:
$ >log ( ps; who; df )
will work, so will
$ > log10 < /etc/hosts (while read -r line; do print $line; done )
(*) It will (as long as file exists). The shell opens all three files during the scan, and cat will be the only word remaining on the command line. In simple terms. the shell will look after the 'connectivity' between cat's I/O streams and the files.
Twitter Updates
G-AVLN in front of her home
Mostly Unix and Linux topics. But flying might get a mention too.
Subscribe to:
Post Comments (Atom)
Blog Archive
- October (1)
- June (1)
- April (2)
- February (3)
- June (1)
- March (1)
- August (3)
- July (2)
- June (1)
- March (1)
- June (3)
- May (1)
- April (5)
- February (1)
- January (5)
- October (1)
- September (3)
- July (4)
- June (5)
- April (3)
- March (1)
- February (3)
- January (3)
- October (7)
- August (2)
- July (3)
- May (1)
- November (4)
- October (1)
- September (1)
- August (2)
- July (2)
- June (3)
- May (3)
- April (2)
- March (2)
- February (3)
- January (1)
- December (2)
- November (1)
- October (6)
- September (6)
- August (1)
- July (2)
- June (8)
- May (3)
- April (4)
- March (3)
No comments:
Post a Comment