Search Results

Search: Posts Made By: leo.maveriick
882
Posted By vgersh99
egrep '^var1 +[0-9]+$'
egrep '^var1 +[0-9]+$'
1,607
Posted By bartus11
Try: awk 'NF>11{t=$1}/Total/{$1=t"\t\t";print}'...
Try: awk 'NF>11{t=$1}/Total/{$1=t"\t\t";print}' file
1,150
Posted By amitranjansahu
here is the basic logic . here you can get two...
here is the basic logic . here you can get two variables $a and $b for every line. You can modify it as per your requirement


while read line
do
a=`echo $line |awk -F: '{print $1 }'`...
1,150
Posted By birei
Hi, Not sure about your output, but try...
Hi,

Not sure about your output, but try this:

$ perl -aF: -ne '$input = join(":", @F); chomp $input; print "For $input", "; ", "a=", int($F[0]), ",", "b=", int($F[1]), "\n";' infile
For 8z:1;...
1,150
Posted By Franklin52
Try something like: while IFS=: read a b do ...
Try something like:
while IFS=: read a b
do
a=${a%?}
echo $a
echo $b
done < file
1,150
Posted By Ygor
Try something like...$ echo '8z:1 > 15y:0 >...
Try something like...$ echo '8z:1
> 15y:0
> 7x:0
> 12w:1' | while read my_row
> do
> eval $(echo $my_row|awk -F '[^0-9]:' '{print "a=" $1 ORS "b=" $2}')
> echo do something with $a and $b
>...
2,600
Posted By Franklin52
A solution with awk: echo "3AF9:3B01" | awk ' ...
A solution with awk:
echo "3AF9:3B01" | awk '
{
split($0,a,":")
for(i=hex2dec(a[1]);i<=hex2dec(a[2]);i++){
printf("%X\n", i)
}
}
function hex2dec(h,i,x,v){
...
2,600
Posted By radoulov
perl -e' @range = map hex, split /:/, shift; ...
perl -e'
@range = map hex, split /:/, shift;
printf "%X\n", $_ for $range[0] .. $range[1];
' 3AF9:3B01
2,419
Posted By guruprasadpr
Hi Try this awk 'NF{if (NF==3){x=$1;...
Hi
Try this

awk 'NF{if (NF==3){x=$1; print $1,$NF;}else{print x,$1;};next}1' file

Thanks
Guru
Showing results 1 to 9 of 9

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