Code
Monday, March 30, 2009
BASH Scripting - Take input from file as STDIN
# Save the STDIN file descriptor
0>&3
# Redirect file as STDIN
0< filename
# Do stuff
...
# Close the file descriptor
exec 0>&-
# Assign STDIN back to 0
3>&0
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Blog Archive
►
2021
(1)
►
July
(1)
►
2014
(1)
►
September
(1)
►
2011
(1)
►
October
(1)
►
2010
(1)
►
September
(1)
▼
2009
(2)
▼
March
(2)
BASH Scripting - Take input from file as STDIN
Setting the "Busy" mouse Cursor
►
2006
(1)
►
December
(1)
About Me
Greg Suarez
View my complete profile
No comments:
Post a Comment