![]() |
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 |
| Intern needing to convert bash to perl. | freak | UNIX for Dummies Questions & Answers | 0 | 06-17-2008 10:41 AM |
| passing variable from bash to perl from bash script | arsidh | Shell Programming and Scripting | 10 | 06-04-2008 01:25 PM |
| Another bash shell to perl conversion | freak | UNIX for Dummies Questions & Answers | 6 | 05-29-2008 02:04 PM |
| Converting bash shell to perl | freak | UNIX for Dummies Questions & Answers | 4 | 05-29-2008 01:35 AM |
| convert the below perl sript to shell script | mail2sant | Shell Programming and Scripting | 1 | 04-04-2008 02:36 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Help! Need to convert bash shell to perl
Hello All. I am very new to Linux and I am currently interning. I have been working on a project for 2 weeks now and I have had no success. I have to convert bash shell into perl to decrypt and store files. Here is the code in Linux and Bash. Any help would be greatly appreciated.
$ cd/usr/data/images/idtdata $ mv pgs/155*.pgp . $ ./dcryptidt (dcryptidt written in bash is: for i in `ls -l *.pgp` do `/usr/bin/gpg --passphrase-fd 0 $i < .sunspot` done) $ mv *.pgp pgps/080531 $ cd txts $ mv ../*.txt . $ rm loadfile.seq $ ./updidtf (updidtf written in bash is: for i in `ls -l *.txt` do `./cnvidtf.pl $i` `curl -u mydrive:password --disable-epsv -T loadfile.seq ftp://11.1.11.1` `mysql -u mydrive -h 11.1.11.1 -ptpassword < ldinsdocs.sql` done) $ mv * .txt hold/080501 $ cd.. (./cnvidtf.pl is already written in perl and the code is: if ( $#ARGV < 0) { die ("Need a file name, usage is cnvidtf FILENAME. \n"); } $atab = "\t"; $infile = $ARG[0]; $output file = ">loadfile.seq"; open(Ifile, $infile) || die ("Could not open input file. \n \n"); foreach $line (<Ifile>){ $ofiledatline = $atab.$line; print Ofile $ofiledataline; } close (Ifile); close (Ofile); Reply With Quote |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|