Welcome To Snipplr
Everyone's Recent Bash Snippets Tagged Bash
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
<ol><li>save as filename.sh</li><li>chmod u+x filename.sh</li><li>usage : ./filename.sh\"url\"</li></ol>
1
1009
posted 13 years ago by kentoy
Quick Look is the little window you get in Finder when you select a file and press the space bar. You can get the same from the command line with the following command (-p is a full window, -t is a thumbnail). You can even output it to a file with th...
0
662
posted 13 years ago by gotofritz
Bash
Bash (Command Line): Loop through directories in specified location, replacing directories in current directory (with backup)
This command line aims at moving directories from a target location to the present working directory (pwd), backing the pwd directories up as it encounters them.
The script works by:
1. Iterating through the contents of the target directory (us...
0
765
posted 13 years ago by karlhorky
the os x version of realpath works differently than the linux version; the following allows you to attain the same functionality in a shell on os x as `readlink -f $0` on a standard linux dist.
0
820
posted 14 years ago by iloveitaly
Using a sorted list remove all the lines in file2 from file1
0
448
posted 14 years ago by benpjohnson
This will recursively search your directory tree (starting at dir ‘dot’) and chmod 755 all directories only.
find . -type d -exec chmod 755 {} \;
Similarly, the following will chmod all files only (and ignore the directories):
find . -...
1
689
posted 14 years ago by MikeyLikesIt
An easy was to tunnel remote Couchdb instance into a local machine using ssh tunneling, by using the 5893 local port we enable the local instance to run (replication is only a click away).
0
828
posted 14 years ago by narkisr
This can be used to check if an update of a CMS (or blog, plugin, ...) changed something in the frontend (content or HTML).
Run the script with the file that contains the urls as parameter:
`wiff.sh urllist.txt`
urllist.txt contains the urls...
0
689
posted 14 years ago by ascarion