![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| recursive wc on a directory? | bimba17 | UNIX for Dummies Questions & Answers | 13 | 06-21-2009 11:51 AM |
| Recursive FTP -- here at last. | Perderabo | Shell Programming and Scripting | 52 | 03-25-2009 12:15 PM |
| Recursive pid script | jbarnhar | Shell Programming and Scripting | 3 | 05-02-2007 03:14 PM |
| recursive sorting | fermisoft | UNIX for Advanced & Expert Users | 1 | 08-16-2005 08:46 AM |
| Recursive FTP | aslamg | UNIX for Dummies Questions & Answers | 1 | 03-08-2001 04:27 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
recursive rcp
I wrote a shell script (AIX) to extract the file "/rep1/toto" from all the hosts referred in a list and send them to one local directory named ~/$host-$file with the hostname as prefix
rcp -p user@host:/rep1/$file ~/$host-$file where file = toto ==> it works ! I would do the same thing but with "/rep1/toto*" (all files beginning with toto in /rep1 ) and naming these files "$host-$file" for example : host1-toto1 ; host1-toto2 etc... could someone help me , please thanks in advance christian |
|
||||
|
Thanks for your answer , but first i would test if i enter :
/rep1/toto or /rep1/toto* , in other words if the input contains a "*" to do or not the loop i'm searching for the test , if you have the answer please welcome ! christian |
|
||||
|
Thanks that's right ,
last thing , for the same script i would extract the filename from a string whether the string is short or long : /rep1/rep2/rep3/file => file or /rep1/file => file i'm trying with awk command and NR parameter without success at this time , maybe (for sure) you will find before me ? thanks christian |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|