• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to create a batch file in unix  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to create a batch file in unix?
like this way.
when i send a set of commands to unix
ls -ld
ls -la
ls
the unix automatically create a temporary file "abc" and stored
these commands, and after execute these commands to one bye one
and its result must be stored in a temporary file "abc.txt"
How?
 
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Execute the command as ls -l > /path to/abc.txt. This will writes the command output to abc.txt. If you want to append the output to abc.txt, execute ls -l >> /path to/abc.txt
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!