$ssh -D 9999 username@ip-address-of-ssh-serverListens to Port 9999 and tunnels the connection via the ssh-server connected
Internet is vague. It has nothing left to be covered now. However, things get messed up sometimes and I forgot where I used to find the materials I had just searched for some days ago. So, I am now gathering all those into this blog. This is just my bookmark or my scrapbook or anything you wish to say. If you think these are helpful, you can take references, no any rights to be defined here. No styles and no colorful designs, just an area to jot down some scraps and all. Enjoy
$ssh -D 9999 username@ip-address-of-ssh-server#!/bin/bash while [ true ] do echo "quering bearerbox" sleep 1 count=$(ps -C "bearerbox" | wc -l) echo $count if [ $count -eq 2 ] then echo "attempting to kill bearerbox" killall bearerbox else sleep 1 echo "======= bearerbox killed ========" break fi done sleep 1 bearerbox /etc/kannel/kannel.conf smsfox /etc/kannel/kannel.conf
varname='some text'b) store command output to a variable
echo $varname
varname=`somecommand`
echo $varname
or,
an alternate way to do it
varname=$(some command)
echo $varname
eg. - to store current timestamp in a variablec)s
current_timestamp=`date +%s`
echo $current_timestamp
egd)
ege)
egf)
egg)
eg