Use the $( ... )
construct:
hash=$(genhash --use-ssl -s $IP -p 443 --url $URL | grep MD5 | grep -c $MD5)
More Related Contents:
- Correct Bash and shell script variable capitalization
- How can I compare numbers in Bash?
- Pipe output and capture exit status in Bash
- Redirect stderr and stdout in Bash [duplicate]
- Why equal to operator does not work if it is surrounded by space?
- Which characters need to be escaped when using Bash?
- “~/Desktop/test.txt: No such file or directory”
- Capturing Groups From a Grep RegEx
- How to put a line comment for a multi-line command [duplicate]
- bash : Illegal number
- Shell redirection i/o order
- In bash, how do I bind a function key to a command?
- Bash conditional based on exit code of command
- Simulating ENTER keypress in bash script
- How to make awk ignore the field delimiter inside double quotes? [duplicate]
- Passing arguments by reference
- Get just the filename from a path in a Bash script [duplicate]
- Rename multiple files in shell [duplicate]
- Is there a way to make bash job control quiet?
- Get current directory or folder name (without the full path)
- How do file descriptors work?
- Convert Unix timestamp to a date string
- Using Bash to display a progress indicator (spinner) [duplicate]
- When does command substitution spawn more subshells than the same commands in isolation?
- Extract version number from a string
- Temporarily change current working directory in bash to run a command [duplicate]
- How to break out of a loop in Bash?
- How to tell if a string is not defined in a Bash shell script
- BASH: Writing a Script to Recursively Travel a Directory of N Levels
- How to grep for case insensitive string in a file?