netstat -an | grep :443 | grep -v TIME_WAIT | wc -l
How do I convert this retunring value of 171 to a variable foo
so that If I enter $foo
it will return 171.
netstat -an | grep :443 | grep -v TIME_WAIT | wc -l
How do I convert this retunring value of 171 to a variable foo
so that If I enter $foo
it will return 171.
First, export the variable foo with your command:
Then,
echo $foo
should return what you want.