I need to write a script (timetable.sh) that parses the contents of a text file and applies it to a 'curl' command using the following command.
cat units.txt | ./timetable.sh
Inside the units.txt file there are 3 lines of text which need to go into bold part of the curl command:
curl -d "p_unit_cd=csg2305
Search" \ http://apps.wcms.ecu.edu.au/semester-timetable/lookup
How can I do this? I can't seem to find a solution anywhere.
Or even another script that does the same would be extremely useful.
Thanks in advance