Welcome To Snipplr


Everyone's Recent Snippets Tagged Bash



menu will only quit when 'q' is pressed
2 784 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 773 posted 15 years ago by scarfboy
This command lists all the differences that were made between two revisions in SVN.
2 699 posted 15 years ago by narkisr
A useful AWK one liner, see http://student.northpark.edu/pemente/awk/awk1line.txt for some more
1 593 posted 15 years ago by narkisr
2 707 posted 15 years ago by Juanje
1 529 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 740 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 429 posted 15 years ago by Juanje
A bash script which installs rubygems under ubuntu hardy.
0 443 posted 15 years ago by narkisr
0 496 posted 15 years ago by Juanje
Useful if you need to run the same command for lots and lots of different parameters
0 862 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 675 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 629 posted 15 years ago by mandric
0 410 posted 15 years ago by jonallanharper
Execute this to remove the .svn directory from the current directory and all sub directories
3 658 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 1301 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 538 posted 16 years ago by cczona
1 572 posted 16 years ago by sou
1 690 posted 16 years ago by CharlyBr
//for options available, see: http://www.ss64.com/bash/shopt.html
1 672 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 618 posted 16 years ago by jhenry
Improved blipsend miniapp Requires curl, zenity and sed
0 453 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 923 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 627 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 655 posted 16 years ago by robh
Execute multiple commands in background, wait for each to be finished and evaluate their return codes.
0 701 posted 16 years ago by nohn