I'm having some problems with the following code:
echo XX.txt 4 | script
The script should write the 4th line of XX.txt, but I'm having trouble getting both echoed arguments into variables in the script. I have to use echo because it's a school exercise. :)
How can I get XX.txt and 4 as seperate variables in my script? I've tried using read, but it puts both arguments in only 1 variable.
Hope you can help me