I desire to run a cat heredocument in a single row instead the natural syntax of 3 rows (opener, content, and delimiter). My need to do so is mostly aesthetic as the redirected content aimed aimed to be part of a handbook text file and I would like to save as much rows as I can, in that particular file).Doing cat <<< TEST > ~/myRep/tiesto tiesto TEST (what I would normally split for 3 parts) results in an errors:tiesto: No such file or direcotryTEST: No such file or directory.Is it even possible to execute one-row heredocuments in Bash?
Single line heredocument - Possible in Bash?
here document;here string
Yes, but you'd be using a here-string rather than a here-document:cat > ~/myRep/tiesto <<<'tiesto'This will send the string tiesto to cat on its standard input, and it will write the string to the file ~/myRep/tiesto through a redirection of its standard output.