Welcome To Snipplr


Everyone's Recent Snippets Tagged Bash



menu will only quit when 'q' is pressed
2 800 posted 15 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 789 posted 15 years ago by scarfboy
This command lists all the differences that were made between two revisions in SVN.
2 722 posted 15 years ago by narkisr
A useful AWK one liner, see http://student.northpark.edu/pemente/awk/awk1line.txt for some more
1 604 posted 15 years ago by narkisr
2 722 posted 15 years ago by Juanje
1 544 posted 15 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 759 posted 15 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 443 posted 15 years ago by Juanje
A bash script which installs rubygems under ubuntu hardy.
0 451 posted 15 years ago by narkisr
0 506 posted 15 years ago by Juanje
Useful if you need to run the same command for lots and lots of different parameters
0 877 posted 15 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 692 posted 15 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 639 posted 16 years ago by mandric
0 424 posted 16 years ago by jonallanharper
Execute this to remove the .svn directory from the current directory and all sub directories
3 673 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 1309 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 550 posted 16 years ago by cczona
1 591 posted 16 years ago by sou
1 704 posted 16 years ago by CharlyBr
//for options available, see: http://www.ss64.com/bash/shopt.html
1 683 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 638 posted 16 years ago by jhenry
Improved blipsend miniapp Requires curl, zenity and sed
0 460 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 940 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 641 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 670 posted 16 years ago by robh
Execute multiple commands in background, wait for each to be finished and evaluate their return codes.
0 717 posted 16 years ago by nohn