Check These Out
Replace 'csv_file.csv' with your filename.
This checks if the branch has been merged with master and then will delete the ones that have been. Keeps your local git repo nice and clean from all the branches.
There are two ways to use "here documents" with bash to fill stdin:
The following example shows use with the "bc" command.
a) Using a delimiter at the end of data:
$ less-than less-than eeooff bc
> k=1024
> m=k*k
> g=k*m
> g
> eeooff
1073741824
b) using the "inline" verion with three less-than symbols:
$ less-than less-than less-than "k=1024; m=k*k; g=k*m; g" bc
1073741824
One nice advantage of using the triple less-than version is that the command can easily be recalled
from command line history and re-executed.
PS: in this "description", I had to use the name "less-than" to represent the less-than symbol because the commandlinefu input text box seems to eat up the real less-than symbols. Odd.
This uses PV to monitor the progress of the MySQL import and displays it though Zenity. You could also do this
pv ~/database.sql | mysql -u root -pPASSWORD -D database_name
and get a display in the CLI that looks like this
2.19MB 0:00:06 [ 160kB/s] [> ] 5% ETA 0:01:40
My Nautalus script using this command is here
http://www.daniweb.com/forums/post1253285.html#post1253285
Searches all log files (including archived bzip2 files) for invalid user and PAM authentication errors, both of which are indicative of brute force attempts at logging into computer. A list of all unique IP addresses and domain names is appended to hosts.deny. The command (and grep error messages) will work on Mac OS X 10.6, small adjustments may be needed for other OSs.
trap is the bash builtin that allows you to execute commands when the current script receives a particular signal.
Uses $0 for the script name, $$ for the script PID, tee to output to STDOUT as well as a log file and ps to log other running processes.
Use vim's diff mode to edit two or more files in one window. The '+diffoff!' turns off diff highlighting when the session is started.
Use ctrl+w + ctrl+w to switch between windows.
Look for an rpm that supplies a specific file that you don't yet have installed.
extremely useful when you need something and don't know where it is.. or what its called.
note: uses grep like syntax.