Shell scripts should run correctly using dash.
Each script must start with a comment containing your name and a description.
References: susv4 sh, dash, head, tail, seq, test, test1, test2, test3
Write a shell script which joins successive pairs of lines from standard input and writes them to standard output.
Use a loop to read lines from input. Do not use any temporary files or any external programs or utilities.
Write a shell script to rotate lines from a text file and display the result to standard output:
rotate N FILECircular rotate N lines from FILE. The first N lines are skipped from the beginning and appended to the end of output.
The script must print an error message and exit if there are too few or too many arguments.
Use head and tail. Do not use any temporary files.
Write a shell script to implement the following version of the seq command:
seq first last seq first increment lastPrint integer numbers from first to last in steps of increment.
If increment is not specified, it defaults to 1 if first < last, or -1 if last < first.
The script must print an error message and exit if there are too few or too many arguments, or if the specified arguments would produce no output or cause an infinite loop.
Use only built-in shell commands and arithmetic, do not use any external programs or utilities.