i want that way
this is too general
but the problem is that i have in my shell script
something like that #hub
ssh myserver "${SIIR}input.pl $*"
SIIR has many characters and the file input.pl read them
so i create this solution
---------- Post updated at 04:19 PM ---------- Previous update was at 04:33 AM ----------
i want to create a shell script which input parameters(scripts) and then save(in file) one line in time.
then i want to create perl script who can read one line in time.
i want all this in loop
any idea?
@Evelin90: You must understand that you can read files line by line using a shell script too. Why do you want to invoke perl for that? I am, to some extent, able to understand the flowchart that you've attached in your post, but what is the exact purpose of having such a workflow? Why can't you have it this way:
----------
| cmd |
----------
|
|
V
----------
| .sh |----> Save file
----------
|
|
V
---------------
| Read file |
| using shell |
| script |
---------------
---------- Post updated at 12:42 ---------- Previous update was at 09:11 ----------
This is the best I could think of from your question:
In your shell script, write a line of code that will echo all arguments into a file. Then scp that file to myserver. Hope you have enabled password-less access by sharing the public key from host-machine to myserver. I think yes, since you're already ssh-ing to myserver. Once you copy arguments.dat to myserver, open the file in perl and process the arguments as required.