Welcome To Snipplr


Everyone's Recent Snippets Tagged Bash



menu will only quit when 'q' is pressed
2 2377 posted 17 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 2284 posted 17 years ago by scarfboy
This command lists all the differences that were made between two revisions in SVN.
2 2173 posted 17 years ago by narkisr
A useful AWK one liner, see http://student.northpark.edu/pemente/awk/awk1line.txt for some more
1 1751 posted 18 years ago by narkisr
2 2188 posted 18 years ago by Juanje
1 1616 posted 18 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 2467 posted 18 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 1479 posted 18 years ago by Juanje
A bash script which installs rubygems under ubuntu hardy.
0 1459 posted 18 years ago by narkisr
0 1544 posted 18 years ago by Juanje
Useful if you need to run the same command for lots and lots of different parameters
0 2546 posted 18 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 2065 posted 18 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 1831 posted 18 years ago by mandric
0 1327 posted 18 years ago by jonallanharper
Execute this to remove the .svn directory from the current directory and all sub directories
3 2152 posted 18 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 2718 posted 18 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 1641 posted 18 years ago by cczona
1 1850 posted 18 years ago by sou
1 1952 posted 18 years ago by CharlyBr
//for options available, see: http://www.ss64.com/bash/shopt.html
1 1957 posted 18 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 1799 posted 18 years ago by jhenry
Improved blipsend miniapp Requires curl, zenity and sed
0 1390 posted 18 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 2289 posted 18 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 1753 posted 18 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 1952 posted 18 years ago by robh
Execute multiple commands in background, wait for each to be finished and evaluate their return codes.
0 1858 posted 18 years ago by nohn