Check These Out
The command cechks if we are connected to a X11 console, if the $TERM var noct yet contains a "screen" derivat, and only then attachs to tmux.
You could add a test for interactive shell [[ $- == *i* ]] but your .bashrc has that already, I bet.
Trace python statement execution and syscalls invoked during that simultaneously
The command (above) will remove any duplicate rows based on the FIRST column of data in an un-sorted file.
The '$1' represents a positional parameter. You can change both instances of '$1' in the command to remove duplicates based on a different column, for instance, the third:
$ awk '{ if ($3 in stored_lines) x=1; else print; stored_lines[$3]=1 }' infile.txt > outfile.txt
Or you can change it to '$0' to base the removal on the whole row:
$ awk '{ if ($0 in stored_lines) x=1; else print; stored_lines[$0]=1 }' infile.txt > outfile.txt
** Note: I wouldn't use this on a MASSIVE file, unless you're RAM-rich ;) **
Colorify colors input by converting the text to a number and then performing modulo 7 on it. This resulting number is used as the color escape code. This can be used to color the results of commands with complex outputs (like "482279054165371") so if any of the digits change, there's a good chance the color will change too. I say good chance because there's only 7 unique colors here, so assuming you were watching random numbers, there would be a 6/7 chance that the color would change when the number changed. This should really only be used to help quickly identify when things change, but should not be the only thing relied upon to positively assert that an output has not changed.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
List out all the names from the zip file and pass it to xargs utility to delete each one of them
another method :
awk '{gsub(/:/, "\n");print}'
Friday is the 5th day of the week, monday is the 1st.
Output may be affected by locale.
Using this command you can track a moment when usb device was attached.