|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
How to find a file and email it.
Hi Folks,
I need to be able to find a file x and email it to a user via a script. The file could exist in 2 places, both of these places are under the directory $APPLCSF (/p01/out) ie. it could be in /p01/out/dir1 or /p01/out/dir2 So I guess I need to do something like cd $APPLCSF find . -name filex -print This will come back with the filename and place, but how do I use this result ? I need to then uuencode filex | mail -s "..." auser@blah Thanks for any help provided. Dave |
|
#2
|
|||
|
|||
|
for filex in `find . -name filex`
do uuencode $filex | mail -s "..." auser@blah done |
|
#3
|
|||
|
|||
|
thanks.
|
|
#4
|
|||
|
|||
|
Wouldn't this work as well?
cd $APPLCSF find . -name filex -maxdepth 3 -exec sh -c 'uuencode ${0} | mail -s "..." auser@blah' {} \; I apologize if I am completely wrong and this command works differently in Unix than in Linux, as I am used to. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > How to find a file and email it. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|