0

I'm looking to create an alais in IOS Terminal that will create a file with a comment at the top of the file and append another file to the end

Output I would like

\#2Thu Dec  3 14:39:41 MST 2015
--fileContents--

Attempt

echo # > x.txt; date >> x.txt; cat file.txt >>> x.txt;

But the results put the # and the date on separate lines... How would I do it with keeping them on the same line

Seth McClaine
  • 9,142
  • 6
  • 38
  • 64

1 Answers1

1

I've found that adding ` around date inside of an echo executes the statement.

Resolution

echo # `date` > x.txt; cat file.txt >> x.txt;
Seth McClaine
  • 9,142
  • 6
  • 38
  • 64