Monday, 15 July 2013

redirect - Bash script not exiting after completion -


First of all, disclaimer: I am very new to this.

I am trying to write an ordinary bad script for assignment. I have to print the date, finger, and uptime output stdout and in a file. What I am reading seems to be the failure to get out because the processes are running in a subsealand, but by reading, I really do not understand how to do it. I came to know that by using a pipe and input redirection through T, I get the result that I want, but it will not be outside. In addition to a pipe, and especially typing: | Tee Time_Script_Output.txt is very disabled on every line, and I'm exploring a cleaner way to write scripts.

Code:

  #! / Bin / bash bash / bin / date | T Time_Script_OutputTacks & amp; / Usr / bin / finger | T Time_Script_OutputTacks & amp; / Usr / bin / uptime | T Time_Script_Output. Thanksgiving !, Nick Quanggh   

That first < Code> bash line is incorrect, assuming that you are running this script ( bash script.sh ) when you run