Check These Out
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
in case you could afford installing jq
i want to count how many regex code i have used in vim in a long time
so i make a directory in svn host and post record to this directory
of course i dont want to post manually so i worte a script to do that
and this is the core thing to do
Thanks to knoppix5 for the idea :-)
Print selected lines from a file or the output of a command.
Usage:
$ every NTH MAX [FILE]
Print every NTH line (from the first MAX lines) of FILE.
If FILE is omitted, stdin is used.
The command simply passes the input to a sed script:
$ sed -n -e "${2}q" -e "0~${1}p" ${3:-/dev/stdin}
print no output
$ sed -n
quit after this many lines (controlled by the second parameter)
$ -e "${2}q"
print every NTH line (controlled by the first parameter)
$ -e "0~${1}p"
take input from $3 (if it exists) otherwise use /dev/stdin
${3:-/dev/stdin}
This is a command to be used inside of MS-DOS batch files to check existence of commands as preconditions before actual batch processing can be started. If the command is found, batch script continues execution. If not, a message is printed on screen, script then waits for user pressing a key and exits.
An error message of the command itself is suppressed for clarity purpose.
Watch the temperatures of your CPU cores in real time at the command line. Press CONTROL+C to end.
GORY DETAILS: Your computer needs to support sensors (many laptops, for example, do not). You'll need to install the lm-sensors package if it isn't already installed. And it helps to run the `sensors-detect` command to set up your sensor kernel modules first. At the very end of the sensors-detect interactive shell prompt, answer YES to add the new lines to the list of kernel modules loaded at boot.
Takes the same arguments that ack does. E.g. ack-open -i "searchterm" opens all files below the current directory containing the search term. The search term is also highlighted within vim if you have hlsearch set. Works on zsh, unsure if it works on bash.
Note: ubuntu users have to change ack to ack-grep unless you already have it aliased (as I do)
By default, screen tries to restore its old window sizes when attaching to resizable terminals. This command is the command-line equivalent to typing ^A F to fit an open screen session to the window.