Welcome To Snipplr
Everyone's Recent Bash Snippets Tagged perl
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« Prev 1 Next »
Find and replace contents of files ending in .php with nothing. then append contents of template.php to all files in directory
0
620
posted 11 years ago by zlincoln
Add this to your .profile or .bash_rc file, source the file, navigate to the directory and call "rm_whitespace"
Based on: http://snipplr.com/view/4468/batch-rename-files-in-directory/
1
1221
posted 12 years ago by licensetoil
export bookmarks.html file, extract links from that file to a list , using the list as INPUT to linkchecker that reports dead links
0
675
posted 14 years ago by rowntreerob
Find the most recently modified file in a directory tree and output its name and modification time. Use index 8 or 10 instead of 9 for access and inode modification time, respectively (see perlfunc manual page - function stat).
This is great for...
0
611
posted 14 years ago by deepsoul
Replace all the occurrences of a string with a replacement in the supplied files.
2
744
posted 15 years ago by sanjivarunsahayamhotmailcom
\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
905
posted 16 years ago by ches
test with echo instead of mv
example removes spaces after dots, replaces spaces with _, removes ' , and -, and finally lowercases filenames
1
744
posted 16 years ago by iblis
This allows you to use perl syntax highlighting in vi for test scripts that use the ".t" file extension
0
725
posted 16 years ago by wolfie
« Prev 1 Next »