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
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
#!/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
#!/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
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 $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
<?php | |
if (osse.cute == true) { | |
// if (osse.bugger == true) { | |
print ":)"; | |
} | |
?> |
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
$datetext{string} = strftime "%Y-%B-%d (%A)", localtime; | |
sub isDateAlreadyWritten { | |
my $ret = 0; | |
my $bw = File::ReadBackwards->new($log_file); | |
until ($bw->eof) { | |
my $line = $bw->readline; | |
chomp($line); |
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$ cat osse.txt | |
sjohnson osse | |
a b | |
sjohnson@web1:/tmp/sjohnson$ for i in {0..5} ; do cat osse.txt | tab --spaces=$i ; done | |
sjohnsonosse | |
a b | |
sjohnson osse | |
a b | |
sjohnson osse | |
a b |
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:~$ history | tail | |
1207 mb rpkergp regperk geropkgrepkgo | |
1208 mb B4E-1351716775-0.xls B4E-small.xls | |
1209 echo $PS1 | md5sum | |
1210 history | |
1211 stuff | |
1212 blah | |
1213 cheese | |
1214 history | tail | hd | |
1215 vi |