Sponsored Content
Top Forums UNIX for Advanced & Expert Users find command from shell scipt (ksh) problem Post 302164738 by fpmurphy on Tuesday 5th of February 2008 08:14:28 PM
Old 02-05-2008
Here is the ouput when you do set -x on the script

Code:
+ FIND_STRING=$'\\( -name \'testfile*.Z\' -o -name \'DUMMY_*\' \\)'
+ echo '\(' -name $'\'testfile*.Z\'' -o -name $'\'DUMMY_*\'' '\)'
\( -name 'testfile*.Z' -o -name 'DUMMY_*' \)
+ find /tmp -type f '\(' -name $'\'testfile*.Z\'' -o -name $'\'DUMMY_*\'' '\)' -print
find: \(: unknown option

If you change the find command line to

Code:
eval find /tmp -type f $FIND_STRING -print

things work as expected.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Problem with find command in C-shell

when i use the following command find / -name '*.*' -exec grep -il 'text' {} \; I can redirect the errors to /dev/null. This happens only in ksh but not in csh. the 2>/dev/null is not working in csh. Can you some one suggest an alternative for this in csh ? (3 Replies)
Discussion started by: dhanamurthy
3 Replies

2. Shell Programming and Scripting

running db2 sql and exporting output from ksh scipt

Hi there, I am trying to write a shell script as root on AIX 5.3 where I change user to db2inst1, connect to our db2 database, run a sql select query and export the result of the query to a file. The code I have so far is as follows:- #!/usr/bin/ksh su - db2inst1 -c "db2 connect to... (0 Replies)
Discussion started by: candlino
0 Replies

3. Shell Programming and Scripting

help needed. run shell scipt remotely

Dear all , I have a script. this script called get.sh and can get some solaris infomation and save the result as result.tar.gz. the problem is : we have 12 servers. every time. I need to login 12 server and do the same job 12 times.:mad: master server ... (2 Replies)
Discussion started by: chinesefish
2 Replies

4. Shell Programming and Scripting

Problem with embedded FTP command in Ksh - System Cannot find the specified path.

I have the following FTP embedded in a Ksh script on AIX 5.3 ftp -n <<WHATEVER open 10.101.26.218 user hcistats ******* ascii put $thupdatefile put $thcollectfile quit WHATEVER Here is what my script returns: ... (3 Replies)
Discussion started by: troym72
3 Replies

5. Shell Programming and Scripting

Help - Using Find command on dynamic files on KSH

Hi Forum. When I run the following find command, I get the desired results: find . \( -name a.out -o -name '*.o' -o -name 'core' \) -type f -ls I want for my script to dynamically calculate and assign a variable var1 to contain all the files that I want to search instead of hard-coding. ... (2 Replies)
Discussion started by: pchang
2 Replies

6. Shell Programming and Scripting

Change the font of text in output file in shell scipt

hi, I want to change the font of text in output file. :( I tried the below code code: if awk 'BEGIN{if('$RSS'>='1000')exit 0;exit 1}' then RED=`echo "\033 i can see colors in terminal but not in output file :wall: please help me how i can get colors text in output file. edit... (1 Reply)
Discussion started by: sreelu
1 Replies

7. Shell Programming and Scripting

problems with ksh array and find command

set -A allfiles `find $usrhtml -type f` i am trying to populate this array with the find command. It works fine when find is looking through a single directory but when i add a new subdirectory the files in the subdirectory get duplicated. Can anyone help me and fix this so each files in... (1 Reply)
Discussion started by: bjhum33
1 Replies

8. Shell Programming and Scripting

Problem with find command at ksh

Hi! I made a shell script which is offering menu choice. I made it on RHEL & then with little bit changes I was able to run successfully on AIX/ksh. Script is working fine with no issues other than a little one i.e., There is one choice in which I can list out and delete some files from a... (10 Replies)
Discussion started by: sukhdip
10 Replies

9. Shell Programming and Scripting

Regular Expression in Find command [KSH]

Hello, I am trying to use regex wtih find command in KSH. For some reason it is not working as expected. Input: comm_000_abc_0102.c comm_000_abc.c 456_000_abc_1212.cpp 456_000_abc_.cpp Expected Output: comm_000_abc_0102.c kkm_000_abc_8888.cpp (Basically I want to find all... (6 Replies)
Discussion started by: vinay4889
6 Replies

10. How to Post in the The UNIX and Linux Forums

How to run the files in Linux shell scipt?

I have a homework and I tried to work on this but unable to find the solution. Can someone help me how to resolve the issue. I have a package file and it contains text file as prod.ame300_000001.101414145111.A.txt. In the text file it contains pdf file... (1 Reply)
Discussion started by: pavand
1 Replies
ipptool(1)							    Apple Inc.								ipptool(1)

NAME
ipptool - perform internet printing protocol requests SYNOPSIS
ipptool [ --help ] [ --stop-after-include-error ] [ --version ] [ -4 ] [ -6 ] [ -C ] [ -E ] [ -I ] [ -L ] [ -S ] [ -T seconds ] [ -V ver- sion ] [ -X ] [ -c ] [ -d name=value ] [ -f filename ] [ -i seconds ] [ -n repeat-count ] [ -q ] [ -t ] [ -v ] URI filename [ ... filenameN ] DESCRIPTION
ipptool sends IPP requests to the specified URI and tests and/or displays the results. Each named file defines one or more requests, including the expected response status, attributes, and values. Output is either a plain text, formatted text, CSV, or XML report on the standard output, with a non-zero exit status indicating that one or more tests have failed. The file format is described in ipptoolfile(5). OPTIONS
The following options are recognized by ipptool: --help Shows program help. --stop-after-include-error Tells ipptool to stop if an error occurs in an included file. Normally ipptool will continue with subsequent tests after the INCLUDE directive. --version Shows the version of ipptool being used. -4 Specifies that ipptool must connect to the printer or server using IPv4. -6 Specifies that ipptool must connect to the printer or server using IPv6. -C Specifies that requests should be sent using the HTTP/1.1 "Transfer-Encoding: chunked" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. -E Forces TLS encryption when connecting to the server using the HTTP "Upgrade" header. -I Specifies that ipptool will continue past errors. -L Specifies that requests should be sent using the HTTP/1.0 "Content-Length:" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. -S Forces (dedicated) SSL encryption when connecting to the server. -T seconds Specifies a timeout for IPP requests in seconds. -V version Specifies the default IPP version to use: 1.0, 1.1, 2.0, 2.1, or 2.2. If not specified, version 1.1 is used. -X Specifies that XML (Apple plist) output is desired instead of the plain text report. This option is incompatible with the -i (inter- val) and -n (repeat-count) options. -c Specifies that CSV (comma-separated values) output is desired instead of the plain text output. -d name=value Defines the named variable. -f filename Defines the default request filename for tests. -i seconds Specifies that the (last) file should be repeated at the specified interval. This option is incompatible with the -X (XML plist out- put) option. -l Specifies that plain text output is desired. -n repeat-count Specifies that the (last) file should be repeated the specified number of times. This option is incompatible with the -X (XML plist output) option. -t Specifies that CUPS test report output is desired instead of the plain text output. -v Specifies that all request and response attributes should be output in CUPS test mode (-t). This is the default for XML output. EXIT CODE
The ipptool program returns 0 if all tests were sucessful and 1 otherwise. COMPATIBILITY
The ipptool program is unique to CUPS. EXAMPLES
Get a list of completed jobs for "myprinter": ipptool ipp://localhost/printers/myprinter get-completed-jobs.test Send email notifications to "user@example.com" when "myprinter" changes: ipptool -d recipient=mailto:user@example.com ipp://localhost/printers/myprinter create-printer-subscription.test STANDARD FILES
The following standard files are available: color.jpg create-printer-subscription.test document-a4.pdf document-a4.ps document-letter.pdf document-letter.ps get-completed-jobs.test get-jobs.test get-notifications.test get-printer-attributes.test get-subscriptions.test gray.jpg ipp-1.1.test ipp-2.0.test ipp-2.1.test ipp-2.2.test ipp-everywhere.test onepage-a4.pdf onepage-a4.ps onepage-letter.pdf onepage-letter.ps print-job.test print-job-deflate.test print-job-gzip.test testfile.jpg testfile.pcl testfile.pdf testfile.ps testfile.txt validate-job.test SEE ALSO
ipptoolfile(5), http://localhost:631/help COPYRIGHT
Copyright 2007-2013 by Apple Inc. 13 May 2013 CUPS ipptool(1)
All times are GMT -4. The time now is 03:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy