This file contains hidden or 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 | |
| use strict; | |
| use warnings; | |
| use 5.010; | |
| my $delim = ":"; | |
| my $field = 4; | |
| my $grep_string = "something"; |
This file contains hidden or 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
| man () | |
| { | |
| if /usr/bin/man "$@" > /dev/null 2>&1; then | |
| /usr/bin/man "$@" | vi - -R; | |
| else | |
| /usr/bin/man "$@"; | |
| fi | |
| } |
This file contains hidden or 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 | |
| use strict; | |
| use warnings; | |
| use 5.010; | |
| my @a = (1..3); | |
| say @a; |
This file contains hidden or 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 | |
| use strict; | |
| use warnings; | |
| use 5.010; | |
| my $file_input = $ARGV[0]; | |
| open my $fh_read, '<', $file_input or die "can't open input file for reading"; |
This file contains hidden or 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
| sjohnson@web1:/tmp/sjohnson$ rar a osse.zip pig.bash | |
| RAR 3.90 beta 2 Copyright (c) 1993-2009 Alexander Roshal 3 Jun 2009 | |
| Shareware version Type RAR -? for help | |
| Evaluation copy. Please register. | |
| Creating archive osse.zip | |
| Adding pig.bash OK |
This file contains hidden or 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
| condition=1 | |
| case "$1" in | |
| 1|2) | |
| echo "common to 1 and 2" | |
| if [[ $condition ]]; then | |
| echo "condition met" | |
| fi | |
| ;; |
This file contains hidden or 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
| # new and improved! | |
| # | |
| # N.B.: how I felt about legacy tar syntax: http://i.imgur.com/fsZI0.jpg | |
| tar () { | |
| local main_arg="$1" | |
| if [ "${main_arg:0:1}" != "-" ] ; then | |
| main_arg="-$main_arg" | |
| fi |
This file contains hidden or 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
| func! FixShiftGlobal() | |
| if getcmdtype() == ":" | |
| let gcp = getcmdpos()-1 | |
| let head = strpart(getcmdline(), 0, gcp) | |
| if head ==# "G" || head ==# "'<,'>G" || head =~# '^\.,\.+\d\+G$' | |
| return "\<BS>g/" | |
| endif | |
| endif | |
| return '/' | |
| endfunc |
This file contains hidden or 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
| sjohnson@web1:~/bin$ url_deparse | |
| feature enabled: decryption | |
| feature enabled: colour plaintext | |
| http://smu/bogus/?q=h.cart.ecart&t=3&dm=2&a=view&g=supp,grp,&l[supp]=TBM&l[grp]=E&supp=TBM&grp=E&boid=330519&u=102246 | |
| parse_url results: | |
| Array | |
| ( |
This file contains hidden or 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
| Test Summary Report | |
| ------------------- | |
| t/gif.t (Wstat: 0 Tests: 1 Failed: 1) | |
| Failed test: 1 | |
| Parse errors: Bad plan. You planned 0 tests but ran 1. | |
| t/png.t (Wstat: 0 Tests: 2 Failed: 1) | |
| Failed test: 2 | |
| Files=3, Tests=5, 0 wallclock secs ( 0.03 usr + 0.05 sys = 0.08 CPU) | |
| Result: FAIL | |
| Failed 2/3 test programs. 2/5 subtests failed. |