Find command with MKS Toolkit


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Find command with MKS Toolkit
# 1  
Old 09-23-2009
Find command with MKS Toolkit

Hi All,
I want to use the find command with MKS Toolkit. I am using the below syntax,
find.exe . "pattern" -print > tmp.txt
This command is working fine in Unix, but not in MKSToolkit. But it is exiting with 1. Can any one help me how to use the find command with MKS Toolkit.
Thanks for your responses.
# 2  
Old 09-23-2009
The proper syntax would be
Code:
find . -name "pattern" -print

# 3  
Old 09-23-2009
Quote:
Originally Posted by pludi
The proper syntax would be
Code:
find . -name "pattern" -print

Hi,

I have used this, but it is not workin. In MKSToolkit, we have to use find.exe instead of find.Similarly for all the commands. But still it is not working. Please suggest.
# 4  
Old 09-23-2009
Actually what you are doing seems right ... Look athe man page
http://www.mkssoftware.com/docs/man1/find.1.asp

find -- find files within file tree

But there might something missing in env... Can you do find command and try to get exit code $? and compare from man page ..
# 5  
Old 09-23-2009
Quote:
Originally Posted by chakrapani
Actually what you are doing seems right ... Look athe man page
find -- find files within file tree

find -- find files within file tree

But there might something missing in env... Can you do find command and try to get exit code $? and compare from man page ..
The exit code is 1. And below are the various exit codes. Please help.

Possible exit status values are:

0 Successful completion.
1 Failure due to any of the following:
- insufficient memory - invalid character specified after -type - cannot obtain information on a file for -newer - invalid permissions for -perm - cannot open a file for the -cpio option - unknown user or group name - cannot access the PATH variable - cannot execute a command specified for -exec or -ok - syntax error - stack overflow caused by an expression that is too complex 2 Invalid command line option, not enough arguments on command line, missing argument, or argument list that isn't properly terminated.
# 6  
Old 09-23-2009
So Radhika ... Do you see any of them missing in as per the error.

Can you try following and check the error
1. find . -print
2. find / -print

If these also fail then you need to check your env or installation. exit code 1 means a lot ...
# 7  
Old 09-23-2009
I guess, it is because of environment setting, i.e, it is not able to access the PATH variable. Can you help me how to set the path of the variable.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Linux

how to access schedule in cron/mks/w'

Hi, I need to work around 20 boxes to compile list of scheduled jobs on all of them, and these could be set in Linux RHat:cron, or Windows:MKS scheduler, or Windows:scheduler. Do you know how I can access those entries from script to have this whole list in sync, as we have it changed... (0 Replies)
Discussion started by: trento17
0 Replies

2. Shell Programming and Scripting

MKS Korn shell not working when schedule

Hi I have a sample MKS Korn Shell script, it is working fine when I am executing manually (i.e command prompt) but not when schedule through scheduler. here is the script, ls command working just fine manual run, so I thought it could be environment varilable so kept same PATH when running... (1 Reply)
Discussion started by: rkthoka
1 Replies

3. Windows & DOS: Issues & Discussions

Porting Unix c-shell script to Window under MKS-Tookit

Please ignore this question. (0 Replies)
Discussion started by: Sommerville
0 Replies

4. Shell Programming and Scripting

MKS KORN SHELL WONT EXECUTE from windows command prompt

Can anybody help me with this small script , the script works fine and launches the IE from c:\documents and settings \test\my documents>ksh prompt $RunURL1.sh this scitpt works and launches the ie from ksh , but when i schedule it to run the script then i get the error box saying command:1... (2 Replies)
Discussion started by: venu
2 Replies

5. UNIX for Advanced & Expert Users

Named pipes using MKS Toolkit

I'm not sure whether or not this question really belongs in this forum and will accept rebuke should I have mistakenly put it in the wrong place (hopefully the rebuke will be accompanied by an answer, though) I wish to implement named pipe communication between two process using MKS Toolkit. I... (2 Replies)
Discussion started by: ArndW
2 Replies

6. Shell Programming and Scripting

error while sending mails through MKS

#!/bin/ksh email0="dummy@company.com" emails() { # mail Generation echo "Hi" | /mapimail -s "-(Test Mail)From Production- `date`" $email0; } emails i receive the following error IDispatch::new MSMAPI.MAPISession failed: 800401f3 at... (0 Replies)
Discussion started by: Vrgurav
0 Replies

7. 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
Login or Register to Ask a Question