1
1
With cat
its possible to append a file to the data passing through a pipeline:
foo | cat - somefile.txt | bar
Is there a command that lets me append text without using an intermediate file?
foo | xxx - "contents of somefile" | bar
1
1
With cat
its possible to append a file to the data passing through a pipeline:
foo | cat - somefile.txt | bar
Is there a command that lets me append text without using an intermediate file?
foo | xxx - "contents of somefile" | bar
1
You could try:
{ foo; echo contents not stored in file; } | bar
or (almost the same, but starts a subshell):
( foo; echo contents not stored in file ) | bar
Edit: A totally different approach, closer in design to what you were looking for:
foo | cat - <(echo additional contents) | bar
See "Process substitution" in bash's manual.