This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to iterate file list of subdirectory  RSS feed

 
manoj r patil
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have one script which processes files one by one. I want to automate this to process all the files in one subdirectory. So I tried the following script buts its giving me error 'ls: invalid option -- 2'



Any idea what am I doing wrong here?
 
Tim Holloway
Bartender
Posts: 18720
72
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just out of curiosity, was it necessary to be so complicated?

Try this instead:
 
manoj r patil
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want file names and this will give me path along with file name like

Tim Holloway wrote:Just out of curiosity, was it necessary to be so complicated?

Try this instead:
 
Tim Holloway
Bartender
Posts: 18720
72
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
S. Nitesh
Ranch Hand
Posts: 36
1
Chrome Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try this...

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!