![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing variable from bash to perl from bash script | arsidh | Shell Programming and Scripting | 10 | 06-04-2008 12:25 PM |
| Converting bash shell to perl | freak | UNIX for Dummies Questions & Answers | 4 | 05-29-2008 12:35 AM |
| Comp-3 conversion possible with Shell Scripting or PERL? | dfran1972 | Shell Programming and Scripting | 13 | 02-23-2008 07:51 PM |
| bash to perl conversion | thumper | Shell Programming and Scripting | 2 | 07-14-2006 03:36 PM |
| Conversion of bash parsing script to perl? | cstovall | Shell Programming and Scripting | 2 | 10-13-2004 10:33 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Another bash shell to perl conversion
Hello everyone. I am new to linux and need help again. I need help converting this bash shell to linux:
Code:
for i in `ls -l *.txt` do `./cnvidtf.pl $i` `curl -u login:pswd --disable-espv -T loadfile.seq ftp://11.1.11.1` `mysql -u login -h 11.1.11.1 -ppswd < lddocs.sql` done |
|
||||
|
It looks to me that this is already a bash script although a bit peculiar. Back ticks and the ls command are superfluous. How about this:
Code:
for i in *.txt
do
./cnvidtf.pl $i
curl -u login:pswd --disable-espv -T loadfile.seq ftp://11.1.11.1
mysql -u login -h 11.1.11.1 -ppswd < lddocs.sql
done
|
|
||||
|
It's not really clear that the backticks are superfluous. If each of those commands in backticks prints something which can be interpreted as a command, that command will be executed. (I'd be surprised, but that's what the script means. If it's incorrect, then posting a corrected script would be a good first step; porting erroneous code doesn't make much sense.)
If the script is indeed correct, it would help immensely to know what those commands in backticks print, and what the purpose of this script is. (Also, porting it to Perl seems misdirected to say the least, as it's using some of the most powerful and unique features of the shell.) |
![]() |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|