Check These Out
The ctrl+v,ctrl+m portion represents key presses that you should do. If you do it successfully you should see a ^M character appear.
Just a simple way without the need of additional tools. Of course, replace eth0 with your IF.
Replace 'csv_file.csv' with your filename.
On Windows 2000 or later, this command will give a listing of all the registered Windows services. You can then know what the name of a command is in order to start and stop it.
e.g.
$ sc start Apache2.2
or
$ net start Apache2.2
Please note that sc will allow the SERVICE_NAME only, while net will allow both SERVICE_NAME and DISPLAY_NAME.
Note that the space between the = and the next word are important. Not very unixy, that.
http://www.ss64.com/nt/sc.html
http://www.ss64.com/nt/net_service.html
http://technet.microsoft.com/en-us/library/bb490995.aspx
Safe for whitespaces in names.
Yet another ps grep function, but this one includes the column headings.
Useful if you f.i. want to block/allow all connections from a certain provider which uses successive netnames for his ip blocks. In this example I used the german Deutsche Telekom which has DTAG-DIAL followed by a number as netname for the dial in pools.
There are - as always ;) - different ways to do this. If you have seq available you can use
$ net=DTAG-DIAL ; for i in `seq 1 30`; do whois -h whois.ripe.net $net$i | grep '^inetnum:' | sed "s;^.*:;$net$i;" ; done
or without seq you can use bash brace expansion
$ net=DTAG-DIAL ; for i in {1..30}; do whois -h whois.ripe.net $net$i | grep '^inetnum:' | sed "s;^.*:;$net$i;" ; done
or if you like while better than for use something like
$ net=DTAG-DIAL ; i=1 ; while true ; do whois -h whois.ripe.net $net$i | grep '^inetnum:' | sed "s;^.*:;$net$i;" ; test $i = 30 && break ; i=$(expr $i + 1) ; done
and so on.
Would create a file with a meaningful title. Dedicated to John Cons, who is annoying us users. Merry Christmas!!!
Often I need to edit a bash or perl script I've written. I know it's in my path but I don't feel like typing the whole path (or I don't remember the path).