I use bash 4.4.
How do I print the a file to command line.
For example,
$ printf "HELLO" > file
$ my-command file
$ HELLO
where the HELLO
in the last line shows after the second command is run.
A similar method is
$ history
1 ls
2 cd ~
$ !2:p
$ cd ~
which will show the historical command in the next command line without executing it.
cat FILE
to print the content of a file to command line? Is that what you meant? or might be a good idea to clarify the title and elaborate the question a little bit. – Rakib Fiha Feb 11 '20 at 06:51