Bash Script Help

Associate
Joined
28 Jun 2005
Posts
1,320
Can anyone help with a bash script I need to write? I've found various methods on the net but can't seem to get the two together. I need to search a directory, and for every file it finds in the root directory, do something. I can't work out how to get the script to only concentrate on files, not directories, and only in the root directory, and not worry about sub-directories beneath the root.

I've worked out each of the criteria but can't work out how to put the two together.
 
The box I'm working on is Solaris and even though the script is running under bash, the maxdepth option is not being accepted.

find: bad option -maxdepth
find: [-H | -L] path-list predicate-list
 
Back
Top Bottom