![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Capturing output from grpck command on AIX | pdtak | UNIX for Dummies Questions & Answers | 2 | 03-05-2008 02:58 PM |
| Capturing shell script command output | designflaw | Shell Programming and Scripting | 2 | 03-01-2006 04:24 PM |
| Capturing output from C++ program | GMMike | UNIX for Dummies Questions & Answers | 3 | 03-08-2005 09:04 AM |
| capturing output in script | MizzGail | Shell Programming and Scripting | 6 | 06-02-2004 08:44 AM |
| Capturing cli Program output | Christopher | High Level Programming | 1 | 12-06-2001 11:08 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi,
I'm new to ksh - unix platform. I'm writing a small script which will search my current directory and will search for file names which it takes input from the users. Here is the code I'm having. 1 #!/bin/ksh 2 echo "enter a file name to be searched in the current dir : " 3 read filename 4 5 file="find . -name "$filename"" 6 exec $file The Problem is when I put a valid file name which is present in my dir, it shows the path name, which is correct. But when I put an invalid path name it shows no messages. Since, I'm using an exec command it shows the output directly to the console. How can I trap the output from the exec command so that I can add custome messages. Please help. |
| Bookmarks |
| Tags |
| capture, exec, find, search |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|