Created
June 17, 2016 00:19
-
-
Save nivekastoreth/b9cdb4580798538e39131cf6ae75292a to your computer and use it in GitHub Desktop.
lmgtfy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jmaki@jmaki-pc ~ | |
$ cat piping.sh | |
#!/bin/bash | |
echo >&1 "This is writing to stdout" | |
echo >&2 "This is writing to stderr" | |
jmaki@jmaki-pc ~ | |
$ cat lmgtfy.sh | |
#!/bin/bash | |
search_string=$(echo "$@" | tr ' ' '+') | |
lynx --cookies "https://www.google.com/search?q=${search_string}" | |
jmaki@jmaki-pc ~ | |
$ ./piping.sh 2>&1 >/dev/null | xargs ./lmgtfy.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment