1.awk General Syntax Is As Bellow.: 2.to Replace A Pattern in A File
1.awk General Syntax Is As Bellow.: 2.to Replace A Pattern in A File
awk 'BEGIN
{<initializations>}
<search pattern 1> {<program actions>}
<search pattern 2> {<program actions>}
...
END
{<final actions>}'
use Getopt::Long;
my $ret = &GetOptions('help',
\$opt_help,
'modelname=s', \$opt_modelname,
'm=s',
\$opt_modelname
);
14. exeption handle.
$SIG{'INT'} = \&exceptionhandler;
$SIG{'TERM'} = \&exceptionhandler;
15 .vimrc content
syn on
set nu
set wrap
16. deleting a line if a pattern is found in vi
:g/{pattern}/d
17: back substitution in vi
:%s/^\(.*\)$/RewriteRule ^\1 [R=301,L]/g