What I'm looking for is something that would perform a series of commands like this:
# cat file1 >> concated_file
# cat file2 >> concated_file
# cat file3 >> concated_file
# cat file4 >> concated_file
But wouldn't require me to retype the whole command 3 additional times. Maybe just be able to replace the argument from the previous command with syntax like the following:
# cat file1 >> concated_file
# s/file1/file2
# s/file2/file3
# s/file3/file4
I know that if the last argument is the same you could do this:
# cp -p test1.txt test2.txt
# chmod 777 $_
# chown nimmylebby: $_
And you could also use Bash loops like so:
# for f in 'file1' 'file2';
> do
> chmod 750 $f;
> done
However, the above 2 examples are not what I'm looking. I just want to perform a series of commands which only differ by one argument without using for loops. Is this possible? Might not be but hoping it is ;-).