I need a very simple (hopefully) 1 liner command that reads a file that adds a string and gives output to a new file, without changing the original data
file 1 string ------ ------ apple orange banana magic comma
Faille File 2 ------ ------ Apple Apple Banana Oranges Basically, cat file 1 + 'oranges' & gt; File 2
I am using Autosys to run the command, and I'm pretty sure this is & amp; Amp; & Amp; Amp; or ; As part of the same command.
You can:
(cat file 1; Echo 'oranges') & gt; File2 which will create a subshell, which will beat file1 in stdout, then align with stdout. And we capture all those outputs and redirect it to a new file, file 2.
Or these 2 commands:
cp file1 file2 echo 'oranges' & gt; & Gt; File 2 The first file is copied to the new file 2, and then adds the word orange to file 2
here is another liner that does not use is; Neither & amp; Amp;
echo oranges | Cat file 1 - & gt; File2
Comments
Post a Comment