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.