Quantcast
Channel: grep with heredoc in function - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 4

Answer by Sergiy Kolodyazhnyy for grep with heredoc in function

$
0
0

You mentioned you're pasting to terminal. Abandon here-doc altogether, and use a proper clipboard utility, such as xclip (or pbpaste on Mac OS X). With xclip that'd be done as

xclip -o -sel clip | grep --color 'sometext'

See also 'xclip' vs. 'xsel' on the difference between the two utilities.


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>