This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
sub getArguments { ref( $_[0] ) ? shift() : ( @_ % 2 ) ? {} : {@_}; }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl https://raw.github.com/miyagawa/cpanminus/master/cpanm > cpanm | |
mv cpanm ~/ | |
chmod 755 ~/cpanm | |
echo "PERL5LIB=~/perl5/lib/perl5/" >> ~/.bashrc | |
echo "export PERL5LIB" >> ~/.bashrc | |
source ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# | |
# SCRIPT: $0 | |
# AUTHOR: ovntatar | |
# DATE: $date | |
# | |
# PURPOSE: The script bash template | |
# | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . -type f | xargs perl -pi -e 's/OLD_VALUES/NEW_VALUE/g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -MReadonly -e 'print "$Readonly::VERSION\n"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
use strict; | |
use warnings; | |
use File::Find; | |
use Digest::MD5; | |
@ARGV=grep { -d or !warn "`$_': not a directory!\n" } @ARGV; | |
die "Usage: $0 <dir> [<dirs>]" unless @ARGV; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl -s -i.bak -wpl | |
# Usage: change_file -old='old' -new='new' [f1 f2 ...] | |
s/$old/$new/g; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
use warnings; | |
use strict; | |
$|++; | |
use DDP; | |
use LWP; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
# perl script.pl < file.txt | |
use warnings; | |
use strict; | |
my %seen=(); | |
while(<>) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
searchfor="Hallo" # something to search for | |
tempfile="search.log" # temporary logfile | |
echo -n "Searching for $searchfor. " | |
grep -rl $searchfor / 2>/dev/null 1>>$tempfile & |
OlderNewer