Skip to main content

Questions tagged [here-string]

A special, more compact form of the here-document consisting of <<< followed by a single WORD.

4 votes
3 answers
714 views

The 'here string' (<<<) is a useful construct, and can be used in lieu of echo in many situations. However, when calculating a hash (as one example) the addition of a newline character ...
Seamus's user avatar
  • 3,896
5 votes
3 answers
2k views

I have this command to run a checksum in some software I want to install: echo "85762db0edc00ce19a2cd5496d1627903e6198ad850bbbdefb2ceaa46bd20cbd install.sh" | sha256sum -c But I would like ...
Cnnewb's user avatar
  • 51
-2 votes
2 answers
713 views

Here is what I am trying to do: docker exec -it $1 /bin/bash <<< $CONTAINER_ID But this doesn't work: Output: "docker exec" requires at least 2 arguments. It seems that <<...
Anton Kuznetsov's user avatar
1 vote
1 answer
238 views

I have this script: while read $item; do # Some bash logic here done <<< "$({ cat /path/to/some/file; echo; })" Now I want to also use find to find the name of some directories,...
Saeed Neamati's user avatar
1 vote
2 answers
461 views

I have a script similar to this: #!/bin/bash set -euo pipefail IFS=$'\n\t' while read -r l; do echo "${l}" done <<< "$(cat input.txt)" echo Success The command cat ...
Thomas Leplus's user avatar
2 votes
1 answer
279 views

After updating sed to 4.4 version, sed doesn't replace spaces with commas in the output of find command given to it as here-string: sed --version sed (GNU sed) 4.4 ls -l /tmp/test/ total 0 -rw-r--r-- ...
rokpoto.com's user avatar
3 votes
1 answer
497 views

I am trying to redirect the output of a python script as an input into an interactive shell script. test.py print('Hello') print('world') Say test.py is as above prints "Hello world" which ...
ragul rangarajan's user avatar
2 votes
2 answers
2k views

I am trying to output tee while writing to a custom file descriptor. Example: exec 4>"/tmp/testfile.txt"; # open FD 4 tee -a >&4 <<< "Output this to stdout" # ...
kon's user avatar
  • 123

15 30 50 per page