Welcome To Snipplr


Everyone's Recent Snippets Tagged Bash



menu will only quit when 'q' is pressed
2 999 posted 16 years ago by rwczippy
Assumes logs are in /var/log/sshd/* and makes a few text format assumptions that probably make this specific to OpenSSH. Simple, but more than you can see from a quick less.
3 969 posted 16 years ago by scarfboy
This command lists all the differences that were made between two revisions in SVN.
2 889 posted 16 years ago by narkisr
A useful AWK one liner, see http://student.northpark.edu/pemente/awk/awk1line.txt for some more
1 768 posted 16 years ago by narkisr
2 903 posted 16 years ago by Juanje
1 712 posted 16 years ago by Juanje
Some times you need some specific range of lines from a file and the commands 'head' and 'tail' are not enough for you. This could be a easy solution for this problem.
2 956 posted 16 years ago by Juanje
Sorry, the comentaries are in spanish. I will translate them some day. The examples results are indicated with: # -> [result] Usually is the "echo" result
0 617 posted 16 years ago by Juanje
A bash script which installs rubygems under ubuntu hardy.
0 614 posted 16 years ago by narkisr
0 664 posted 16 years ago by Juanje
Useful if you need to run the same command for lots and lots of different parameters
0 1116 posted 16 years ago by wolfie
Useful if you have a shell script running lots of the same command and want to know how many of them have been done
0 881 posted 16 years ago by wolfie
Not sure why I'm posting this madness. Bash can be good for some things though. I think part of the reason I used bash was because I was calling alot of external commands.
0 830 posted 16 years ago by mandric
0 568 posted 16 years ago by jonallanharper
Execute this to remove the .svn directory from the current directory and all sub directories
3 842 posted 16 years ago by meinhard
This is meant to be run as root, so do it at your own risk. It's very raw and needs error checking, but works. I run this script to get new django sites off the ground in a few minutes.
0 1525 posted 16 years ago by mandric
Check out the bash command 'shopt -s cdable_vars' From the man bash page: If set, an argument to the cd builtin command that is not a directory is assumed to be the name of a variable whose value is the directory to change to.
0 703 posted 16 years ago by cczona
1 769 posted 16 years ago by sou
1 899 posted 16 years ago by CharlyBr
//for options available, see: http://www.ss64.com/bash/shopt.html
1 865 posted 16 years ago by cczona
output can be run as a shell script. should be able to refactor this as a piped wget, i think
1 795 posted 16 years ago by jhenry
Improved blipsend miniapp Requires curl, zenity and sed
0 610 posted 16 years ago by lukaszkorecki
\Q...\E perl quoting means no ugly escaping in the regex. find's -print0 with xargs -0 is the secret to handling files with spaces in their names.
1 1157 posted 16 years ago by ches
Il suffit de créer une page PHP et y placer un phpinfo() ou si vous avez accès au serveur en ligne de commande (Putty, WinSCP, ...), vous pouvez tapez cette commande. Dans l'exemple, nous souhaitons savoir si l'extension openssl est présente et no...
0 784 posted 16 years ago by cyo
A very dynamic and flexible bash prompt. Personally I find this to have everything needed. It shows exit status, shortens itself for long directories, and shows bash history for easy referencing. Hopefully it doesn't get messed up.
2 852 posted 16 years ago by robh
Execute multiple commands in background, wait for each to be finished and evaluate their return codes.
0 911 posted 16 years ago by nohn