commandline session $help source source: source filename [arguments] Execute commands from a file in the current shell. Read and execute commands from FILENAME in the current shell. The entries in $PATH are used to find the directory containing FILENAME. If any ARGUMENTS are supplied, they become the positional parameters when FILENAME is executed. Exit Status: …
Monthly Archives: April 2013
TYPE COMMAND Indicate how a command name is interpreted
commandline session $type ls ls is aliased to `ls –color=auto’ $type cp cp is /bin/cp $type mv mv is /bin/mv $type happy bash: type: happy: not found $type gnome-session gnome-session is /usr/bin/gnome-session $type rm rm is /bin/rm $type rm -r rm is /bin/rm bash: type: -r: not found $type ‘rm -r’ bash: type: rm -r: …
Continue reading “TYPE COMMAND Indicate how a command name is interpreted”
nl [ -i ] line number increment at each line
commandline session $cat comma.pl use strict; use warnings; for (qw/ 179550 45960 890458 -12345678 1000000000000/) { (my $n = $_) =~ s/(d+?)(?=(d{3})+b)/$1,/g; print “$nn”; } $nl comma.pl 1 use strict; 2 use warnings; 3 for (qw/ 179550 45960 890458 -12345678 1000000000000/) { 4 (my $n = $_) =~ s/(d+?)(?=(d{3})+b)/$1,/g; 5 print “$nn”; 6 } $nl …
Continue reading “nl [ -i ] line number increment at each line”