Check These Out
Great for watching things like Maildir's or any other queue directory.
This will record the capture channel of your soundcard, directly encoded in Ogg Vorbis, in stereo at quality 5 (I'm using this to record live jam sessions from my line input). You can choose which device to capture (eg. line input, microphone or PCM output) with
$ alsamixer -V capture
You can do the same thing and live encode in MP3 or FLAC if you wish, just check FLAC and LAME man pages.
The -r is for recursive, -F for fixed strings, --include='*.txt' identifies you want all txt files to be search any wildcard will apply, then the string you are looking for and the final * to ensure you go through all files and folders within the folder you execute it.
Example: remote install an application(wine).
sshpass -p 'mypssword' ssh -t mysshloginname@192.168.1.22 "echo 'mypassword' | sudo -S apt-get install wine"
Tested on Ubuntu.
Bash process substitution which curls the website 'hashbang.sh' and executes the shell script embedded in the page.
This is obviously not the most secure way to run something like this, and we will scold you if you try.
The smarter way would be:
Download locally over SSL
> curl https://hashbang.sh >> hashbang.sh
Verify integrty with GPG (If available)
> gpg --recv-keys 0xD2C4C74D8FAA96F5
> gpg --verify hashbang.sh
Inspect source code
> less hashbang.sh
Run
> chmod +x hashbang.sh
> ./hashbang.sh
This line does not include your closing tag in the output.
I often use it to find recently added ou removed device, or using find in /dev, or anything similar.
Just run the command, plug the device, and wait to see him and only him
backup big mysql db to remote machine over ssh. "--skip-opt" option is needed when you can?t allocate full database in ram.
Inspired by http://www.commandlinefu.com/commands/view/2573/remove-all-files-previously-extracted-from-a-tar.gz-file. .... yet for zip files
Since Bash doesn't support two-dimensional arrays, you can limit your columns length by some big enough constant value ( in this example 100 ) and then index the array with i and j, or maybe write your own get() and set() methods to index the array properly like I implemented for example ( see Sample output ).
For example for i=0 and j=0...99 you'll pick up one of 100 elements in the range [0,99] in the one-dimensional array.
For i=1 and j=0...99 you'll pick up one of 100 elements in the range [100,199].
And so on.
Be careful when using this, and remember that in fact you are always using one-dimensional array.