Search Results

Search: Posts Made By: dealerso
4,991
Posted By dealerso
PRINT TWO VARIABLES IN ONE LINE
my command

nawk -F' ' '{for(i=1;i<=NF;i++){if ($i ~ /XX/) print i}}' TOM.bk


The output is in two lines as below

12
30

i want the output in one line with comma delimited
as below
...
2,425
Posted By dealerso
ORS=, but it continuous in one line, ...
ORS=,

but it continuous in one line,
output is

23,79,

and i want

23,79
2,425
Posted By dealerso
i get syntax error. my command prints the...
i get syntax error.
my command prints the column numbers where it finds XX
2,425
Posted By dealerso
print in one line
my command

nawk -F' ' '{for(i=1;i<=NF;i++){if ($i ~ /XX/) print i}}' a.bk


The output is in two lines as below

23
79

i want the output in one line with comma delimited
as below
...
2,449
Posted By dealerso
This work perfectly, thanks
This work perfectly, thanks
2,449
Posted By dealerso
my delimiter is no more comma, it is space ...
my delimiter is no more comma, it is space

---------- Post updated at 08:32 AM ---------- Previous update was at 07:40 AM ----------

when i run

awk -F, -vOFS=" " '{a[$1]+=$2}END{for (i in a)...
2,449
Posted By dealerso
HP-UX acccesm B.11.23 U ia64 3169354550...
HP-UX acccesm B.11.23 U ia64 3169354550 unlimited-user license
1,050
Posted By dealerso
sorting and adding columns
i have a file with two columns, and i want to uniquely sort the values in fist column and add the corresponding values in the second columns
eg
file a contents



tom 200
john 300
sow 500...
2,449
Posted By dealerso
it worked, but i changed the delimiter to space...
it worked, but i changed the delimiter to space and am finding it hard to work

file becomes


tom 200
john 300
sow 500
tom 800
james 50
sow 300
2,449
Posted By dealerso
sort and add
i have a file with two columns, and i want to uniquely sort the values in fist column and add the corresponding values in the second columns
eg
file a contents

tom,200
john,300
sow,500...
2,323
Posted By dealerso
works perfect,thanks Kevintse
works perfect,thanks Kevintse
2,323
Posted By dealerso
Unique sort with three fields
I have another file with three columns A,B,C as below


123,1,502
123,2,506
123,3,702
234,4,101
235,5,104
456,6,104
456,7,100

i want to sort such that i get a unique value in column A,...
2,725
Posted By dealerso
it worked thanks
it worked thanks
2,725
Posted By dealerso
Unique sort with two fields
I have a file with contents below

123,502
123,506
123,702
234,101
235,104
456,104
456,100



i want to sort such that i get a unique value in column A, and for those with multiple...
1,827
Posted By dealerso
when i use awk i get the output ...
when i use awk i get the output

123|zoo|tail|see
234|natan|pay|rat
456|don|som|sin

it should be

123|zoo|dog|pie
123|zoo|tail|see
234|natan|pay|rat
456|don|som|sin
1,827
Posted By dealerso
i am unable to use nawk, i get some error
i am unable to use nawk, i get some error
1,827
Posted By dealerso
two file comparison
now i have a different file zoo.txt with content

123|zoo
234|natan
456|don


and file rick.txt with contents


123|dog|pie|pep
123|tail|see|newt
456|som|sin|sim
234|pay|rat|cat

...
1,327
Posted By dealerso
output should be tom | NOO lasole|YES ...
output should be

tom | NOO
lasole|YES
jon|YES
gille|YES
sam|YES
1,327
Posted By dealerso
its not working
its not working
765
Posted By dealerso
comparing and sorting files
i have a file a with contents


tom
lasole
jon
gillesam

and a file b with contents



tom|1234|abcf|newyork,ohio,oregon
sam|2345|drft|texas,london
hyle|4444|befr|wisconsin...
1,327
Posted By dealerso
comparing in files and output
i have a file a with contents

tom
lasole
jon
gille
sam

and a file b with contents

tom|1234|abcf|newyork,ohio,oregon
sam|2345|drft|texas,london
hyle|4444|befr|wisconsin...
1,341
Posted By dealerso
pasting fields from two files into one
i have two files with contents
file a

1234,abcf
2345,drft
4444,befr


file b

tom,3
sam,5
dog,7


i want to print first column of file b and join to file a and get output as below
...
7,403
Posted By dealerso
thank you, both worked
thank you, both worked
7,403
Posted By dealerso
using awk to print some columns of a file
Hi,
i have a file with content

00:01:20.613 'integer32' 459254
00:01:34.158 459556
00:01:36.626 'integer32' 459255
and i want to print only output as below

00:01:20.613 459254...
28,698
Posted By dealerso
using awk to print absolute value
Hi,
I have a file contaning some variables with negative values, but i just want to print the positive value
awk -F"|" '$2<0 { print $1,$2 }' tom.unl > tee.unl

i want the $2 = absolute value...
Showing results 1 to 25 of 27

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