![]() |
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 |
| bash awk codes to perl | phamp008 | Shell Programming and Scripting | 1 | 03-15-2008 05:11 AM |
| bash to perl conversion | thumper | Shell Programming and Scripting | 2 | 07-14-2006 03:36 PM |
| Perl script - changing passwords | thehoghunter | Shell Programming and Scripting | 3 | 05-03-2002 10:11 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Need help with changing bash to perl
Hi guys,
I am converting a bash script to perl. I need lots of help and pointers on how to make the script work. Any help would be greatly appreciated. Here is what I have: #!/usr/bin/perl #Decrypt Files $dir = "/usr/bin/gpg; opendir(PGP_DIR, $dir) || die "can't opendir $dir: $!"; @pgp_files = grep { /pgp$/ && -f "$dir/$_" } readdir(PGP_DIR); closedir(PGP_DIR); for my $pgp_file (@pgp_files) { my @output = `usr/bin/gpg --passphrase-fd 0 $pgp_file < .sunspot`; #Move Decrypted files to pgps/End of Month Folder move("pgp_file", "pgps/20080531") || die "move failed: $!"; #Change directory to txt chdir "$idtdata/txts" || die "Can't change to $idtdata/txts: $!\n"; #Move text files mv../*.txt .; #Remove Database files rmdir loadfile.seq; #Update text files $some_dir = " " opendir(TXT_DIR, $dir) || die "can't opendir $some_dir: $!"; @txt_files = grep { /txt$/ && -f "$some_dir/$_" } readdir(TXT_DIR); closedir(TXT_DIR); for my $txt_file (@txt_files){ my @output = `./cvnidtf.pl $txt_file` `curl -u mydrive asswd --disable-epsv -T loadfile.seq ftp://11.1.11.1``mysql -u tdrive -h 11.1.11.1 -ppasswd < ldinsdocs.sql`; #Move Updated text files to hold in Beginning of the month folder move("txt_files", "hold/20080501") || die "move failed: $!"; |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|