Computing.Net > Forums > Unix > find command to skip file etns

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

find command to skip file etns

Reply to Message Icon

Name: mehulnp
Date: January 17, 2007 at 14:41:50 Pacific
OS: unix
CPU/Ram: unix
Product: solaris
Comment:

Hi,

I want to find files excluding certain file extension in perl script i am using the below

`find . -type f ! \( -name "*.gz" -o -name "*.tar" -o -name "*.jar" -o -name "*.exe" -o -name "*.o" -o -name "*.dll" -o -name "*.xls" \)
>> $data_file `;


its giving error
sh: syntax error at line 1: `(' unexpected
any idea what am i doing wrong

Thx
Mehul



Sponsored Link
Ads by Google

Response Number 1
Name: thepubba1
Date: February 2, 2007 at 18:54:21 Pacific
Reply:

Did you assign a value to the variable $data_file?

The find statement executes on my system. The only other guess I'd have is if there is some code before the find statement or if you have a shell environment that doesn't like the >>$data_file being on a separate line.


0
Reply to Message Icon

Related Posts

See More


send command in expect replacing newline char in...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: find command to skip file etns

find command and tar files www.computing.net/answers/unix/find-command-and-tar-files/5269.html

What are the commands to list files www.computing.net/answers/unix/what-are-the-commands-to-list-files/5272.html

Find skipping files www.computing.net/answers/unix/find-skipping-files/4819.html