Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 340 Bytes

20200807115646-here-strings.md

File metadata and controls

13 lines (11 loc) · 340 Bytes

Here Strings

I just learned very recently that you can use <<< as a "Here String". I'd always used echo for that in the past, which felt a little gross.

joegallo@radiant:~ $ export X="foo bar baz"
joegallo@radiant:~ $ echo $X | sed "s/bar/quux/g"
foo quux baz
joegallo@radiant:~ $ sed "s/bar/quux/g" <<< $X
foo quux baz