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
open F, $opt{src_file} or die "Cannot open file `$opt{src_file}': $!"; | |
my $counter=0; | |
my $record = ""; | |
while (<F>) { | |
$counter++, process_record($record), $record = "" if /\d{4}\.\d{2}\.\d{2} \d | |
$record .= $_; | |
} | |
# Process last record |
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/sh | |
echo This is Interactive Perl shell | |
rlwrap -A -pgreen -S"perl> " perl -wnE'say eval()//$@' |
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/sh -e | |
# SUM is any command that produces following output: | |
# <sum> <file> | |
#SUM="md5 -r" | |
SUM="md5sum" | |
# F is output file for the list of files found by sumfiles | |
F=/tmp/dupfind.tmp | |
FINDPTH="." |
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/perl | |
# As appeared at http://stackoverflow.com/questions/298314/find-files-in-git-repo-over-x-megabytes-that-dont-exist-in-head | |
use 5.008; | |
use strict; | |
use Memoize; | |
sub usage { die "usage: git-large-blob <size[b|k|m]> [<git-log args ...>]\n" } | |
@ARGV or usage(); | |
my ( $max_size, $unit ) = ( shift =~ /^(\d+)([bkm]?)\z/ ) ? ( $1, $2 ) : usage(); |
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/sh | |
perl -pe 's/\$(\w+)/$ENV{$1}/g' file.sh |
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/perl | |
# As appeared at http://stackoverflow.com/questions/298314/find-files-in-git-repo-over-x-megabytes-that-dont-exist-in-head | |
use 5.008; | |
use strict; | |
use Memoize; | |
sub usage { die "usage: git-large-blob <size[b|k|m]> [<git-log args ...>]\n" } | |
@ARGV or usage(); | |
my ( $max_size, $unit ) = ( shift =~ /^(\d+)([bkm]?)\z/ ) ? ( $1, $2 ) : usage(); |
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/sh | |
obj_name="$1" | |
shift | |
git log "$@" --pretty=format:'%T %h %s' \ | |
| while read tree commit subject ; do | |
if git ls-tree -r $tree | grep -q "$obj_name" ; then | |
echo $commit "$subject" | |
fi | |
done |
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
BEGIN { | |
FS="|"; | |
OFS=";;"; | |
moj=""; | |
oldRT=""; | |
} | |
{ | |
gsub(/ahoj/, "kvak", $1); | |
#$1 = gsub(/>\s+/, ">", $1); | |
#$1 = gsub(/\s+</, "<", $1); |
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 -d -e 1 | |
export ORACLE_HOME=$(find /usr/lib/oracle/ -name client64 | tail -1) | |
export LD_LIBRARY_PATH=$ORACLE_HOME/lib | |
grep CATALOG_VERSION_NO src/include/catalog/catversion.h |
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
use warnings; | |
use Data::Dumper; | |
sub a { 5 }; | |
%a = (a=>1,'b',2); | |
@b = ('a'=>1=>'b'=>2); | |
print Dumper %a; | |
#print $a{'a'},"\n"; | |
print Dumper @b; |
OlderNewer