Link to home
Create AccountLog in
Avatar of MatthewF
MatthewFFlag for Afghanistan

asked on

How do I pass stdout from perl to shell script.

I have a shell script that calls a perl script to decrypt and pulls back a password.  The perl script prints to stdout the decrypted password. (btw when both the scripts are in perl it works, however I have to have a method to do it from shell to perl as well).   The shell script pring this error

/opt/DIFF/[177]: =1qaz2wsx:  not found

fyi is the shell script name and 1qaz2wsx: is the decrypted password.

from shell script
$password=`/opt/DIFF/ $PAR`
read password

from perl script
print STDOUT $pass;

Again, if I do this perl to perl it works.  If I call /opt/DIFF/ with an ARV, ie

/opt/DIFF/ testfile  --->  it prints out the decrypted password to stdout.  

Avatar of Tintin

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account