Sponsored Content
Top Forums Shell Programming and Scripting find: No match due to find command being argument Post 302342150 by Scott on Friday 7th of August 2009 01:49:07 PM
Old 08-07-2009
Hi.

I do believe, after looking at this that I am a confirmed C-Shell disliker (previously I was just an unconfirmed C-Shell disliker!).

But perhaps you can incorporate a little bit of normality in you csh script:

Code:
#!/bin/csh
set LIST="find orion/ic -path *arg*"
ksh << !
$LIST
!
 
 
Output:
orion/ic/blah/11111argZZZ
orion/ic/blah/123argXYZ

Using only csh, I get this:

Code:
#!/bin/csh
set LIST="find orion/ic -path *arg*"
#ksh << !
$LIST
#!
/root/tmp2 # ./Test
find: No match.

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

command find returned bash: /usr/bin/find: Argument list too long

Hello, I create a file touch 1201093003 fichcomp and inside a repertory (which hava a lot of files) I want to list all files created before this file : find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long but i make a filter all... (1 Reply)
Discussion started by: yacsil
1 Replies

2. UNIX for Dummies Questions & Answers

How to find the last argument in a argument line?

How to find the last argument in a argument line? (4 Replies)
Discussion started by: nehagupta2008
4 Replies

3. UNIX for Dummies Questions & Answers

how to find a file named vijay in a directory using find command

I need to find whether there is a file named vijay is there or not in folder named "opt" .I tried "ls *|grep vijay" but it showed permission problem. so i need to use find command (6 Replies)
Discussion started by: amirthraj_12
6 Replies

4. Linux

Simplified find command to find multiple file types

Hi, I'm using the following command to find the multiple requierd file types and its working fine find . -name "*.pl" -o -name "*.pm" -o -name "*.sql" -o -name "*.so" -o -name "*.sh" -o -name "*.java" -o -name "*.class" -o -name "*.jar" -o -name "*.gz" -o -name "*.Z" -type f Though... (2 Replies)
Discussion started by: vickramshetty
2 Replies

5. Shell Programming and Scripting

How to use grep & find command to find references to a particular file

Hi all , I'm new to unix I have a checked project , there exists a file called xxx.config . now my task is to find all the files in the checked out project which references to this xxx.config file. how do i use grep or find command . (2 Replies)
Discussion started by: Gangam
2 Replies

6. UNIX for Dummies Questions & Answers

"-maxdepth 1" argument for Solaris find. Other way to restrict find in only one directory?

Hi I wish to find only files in dir /srv/container/content/imz06/. It means exclude subfolder /srv/container/content/imz06/archive/ > uname -a SunOS testbox6 5.10 Generic_139555-08 sun4v sparc SUNW,Sun-Blade-T6320Its Solaris default "find" > find /srv/container/content/imz06/* -name... (4 Replies)
Discussion started by: slashdotweenie
4 Replies

7. Shell Programming and Scripting

Passing argument on find command

Hi, I'm trying to pass the variable in the find command like below a=log.20111114 find /apps/file3_logs/env3/ -name '$a' -exec ls -lrt {} \; but it's not working thanks in advance. Regards Thelak (3 Replies)
Discussion started by: ajithbe
3 Replies

8. Shell Programming and Scripting

find: missing argument to `-exec' while redirecting using find in perl

Hi Friends, Please help me to sort out this problem, I am running this in centos o/s and whenever I run this script I am getting "find: missing argument to `-exec' " but when I run the same code in the command line I didn't find any problem. I am using perl script to run this ... (2 Replies)
Discussion started by: ramkumarselvam
2 Replies

9. UNIX Desktop Questions & Answers

[SOLVED] find command match pattern

Hello, I would like to ask you, how to match directory names. I need to find only directories, which are created only from numbers and doesn't include any letters. I used command find $AC_WORKDIR/work_archive/test/$dirs_years -maxdepth 1 -name \\* -print If I have dirs like 12... (3 Replies)
Discussion started by: satin1321
3 Replies

10. UNIX for Beginners Questions & Answers

Find command with Metacharacter (*) Should match exact filename

Hi, Below is list of files in my directory. -rw-rw-r--. 1 Roots Roots 0 Dec 26 06:58 12345_kms_report.csv -rw-rw-r--. 1 Roots Roots 0 Dec 26 06:59 12346_kms_report.csv -rw-rw-r--. 1 Roots Roots 0 Dec 26 06:59 12347_kms_report.csv -rw-rw-r--. 1 Roots Roots 0 Dec 26 06:59... (2 Replies)
Discussion started by: Balraj
2 Replies
LOCATE(1)						    BSD General Commands Manual 						 LOCATE(1)

NAME
locate -- find files SYNOPSIS
locate [-d dbpath] pattern DESCRIPTION
locate searches a database for all pathnames which match the specified pattern. The database is recomputed periodically, and contains the pathnames of all files which are publicly accessible. Shell globbing and quoting characters (``*'', ``?'', ``'', ``['' and ``]'') may be used in pattern, although they will have to be escaped from the shell. Preceding any character with a backslash (``'') eliminates any special meaning which it may have. The matching differs in that no characters must be matched explicitly, including slashes (``/''). As a special case, a pattern containing no globbing characters (``foo'') is matched as though it were ``*foo*''. Options: -d dbpath Sets the list of databases to search to dbpath which can name one or more database files separated by ``:'', an empty component in the list represents the default database. The environment variable LOCATE_PATH has the same effect. FILES
/var/db/locate.database Default database EXIT STATUS
locate exits with a 0 if a match is found, and >0 if no match is found or if another problem (such as a missing or corrupted database file) is encountered. SEE ALSO
find(1), fnmatch(3), locate.conf(5), weekly.conf(5), locate.updatedb(8) Woods, James A., "Finding Files Fast", ;login, 8:1, pp. 8-10, 1983. HISTORY
The locate command appeared in 4.4BSD. BSD
April 19, 2004 BSD
All times are GMT -4. The time now is 11:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy