Skip to main content
1 of 2
asura
  • 309
  • 2
  • 4
  • 8

how to use directory as input?

I want to use a directory name as a parameter for a pre-made script. Then the output goes into a newly made file in the home directory. It involves pipe/redirection. How do I do that?

read dir $dir > script > outputfile 
asura
  • 309
  • 2
  • 4
  • 8