Hi all, I'm new to the forums and a total beginner with Unix. I've been given the seemingly simple task of writing a script that asks for two arguments: the first argument being a line of text, the second argument being a document. The script has to take the first argument of text and append it to the specified document in the second argument (no problem), but then the text must be appended to the first line of the document (without using SED or AWK) and I'm confused as to what command I use to do this.
I thought one way around this would be to CAT the first arg and then the second, then save the output to the file noted in the second arg, but because the input and output sources are the same in the second arg, shell doesnt want to know. I have a feeling there is something so simple that I'm missing, but going back over my notes, I can't seem to find what it is that I should know here? Any thoughts?
Perhaps there some way to run VI or EX commands from the shell so that I can paste the input from the first arg into the specified document?
Would really appreciate some advice here! Many thanks.