![]() |
|
|
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 |
| bash. convert mpeg adts to normal mp3 | stahoo23 | Shell Programming and Scripting | 6 | 03-13-2009 05:44 AM |
| passing variable from bash to perl from bash script | arsidh | Shell Programming and Scripting | 10 | 06-04-2008 01:25 PM |
| Perl: How to convert xxx@dom.ain.com to domaincom | Juha | Shell Programming and Scripting | 6 | 04-30-2008 09:09 AM |
| awk to perl convert | jaganadh | Shell Programming and Scripting | 2 | 12-11-2007 11:11 AM |
| Convert bash to sh URGENT :( | Chris Jones | Shell Programming and Scripting | 2 | 04-18-2004 08:18 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Intern needing to convert bash to perl.
Hello All. I am very new to Linux and I am currently interning. I have been working on a project for a week 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); |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|