Search Results

Search: Posts Made By: mtomar
6,727
Posted By durden_tyler
Use the POSIX module then. Unless your...
Use the POSIX module then. Unless your application is from the Dark Ages, you should be fine -


$
$
$ cat -n iterate1.pl
1 #!perl -w
2 use POSIX;
3 ($y1, $m1, $d1) =...
6,727
Posted By durden_tyler
The DateTime core module makes this very simple...
The DateTime core module makes this very simple and elegant -


$
$
$ cat -n iterate.pl
1 #!perl -w
2 use DateTime;
3 ($y1, $m1, $d1) = unpack("A4A2A2",$ARGV[0]);
4 ...
1,614
Posted By michaelrozar17
Your own code could be corrected as echo 2.3M...
Your own code could be corrected as
echo 2.3M asdsad | nawk '{ if (substr($1,length($1)) == "M" ) print $1 FS $2}'
And do not need to specify the blank-space as field separator (nawk -F " ") as it...
1,614
Posted By pravin27
Something like this, awk '/M/' inputfile
Something like this,

awk '/M/' inputfile
1,614
Posted By vgersh99
nawk '$1 ~ /M$/' myFile
nawk '$1 ~ /M$/' myFile
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 07:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy