I need to transfer data via pipe and also transfer file with this data, can I do something like this inside the script?
cat ${1} | ./helper ${1}
and what is the difference if I write
cat ${1} | ./helper < ${1}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
“<” adds the file content to your scripts stdin
pipe also redirects the output for stdin of the ./helper script
you could eithe do
cat ${1} | ./helperor
./helper < ${1}assuming ${1} is a filename and in helper script access it from /dev/stdin