Awk help required


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Awk help required
# 8  
Old 02-24-2010
Thanks you guys a lot!!!!!!!!!!!!

After using nawk, it worked ( I use Solaris ).

Ahmad et All,

Can you tel how, using nawk helped here?


Regards,
Ajay
# 9  
Old 02-24-2010
Ahh thanks for your answer. I thought my AWK was the oldest version. But now I think, I can declare functions, and they aren't part of the original specification.

Thanks ahmad.diab
# 10  
Old 02-24-2010
Code:
paste -d, 1.csv 2.csv | awk -F, '{print $1","$2+$6","$3+$7","$4}'

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

REGEX help required and some sed/awk help as well

Hi guys, I am coding a bash script that makes use of php scripts to pull URL's from a website. These url links will have numbers in them like 0.2.3 I want to make a regex that will yield me such numbers if I use a command like preg_grep. Question1: I need a regex that will tell my preg_grep... (2 Replies)
Discussion started by: mojoman
2 Replies

2. Shell Programming and Scripting

awk help required

Hello, I am trying to get an output from awk and have been unsuccessful so far. There is an input file which contains certain segments, that needs to be read and append with another data after matching the segment... Input file is as shown below ISA*00* *00* *01*781495650... (2 Replies)
Discussion started by: rakeshv
2 Replies

3. Shell Programming and Scripting

Awk help required for formatting digits.

Hi experts, I have two values in the file : For example : partcamt = 72.90 partdamt=27.9 I need to convert these values into 6 digits and ignore the "." sign so that the desired desired output is : total value= 0072000027900 Currently I am using the following code : ... (3 Replies)
Discussion started by: nua7
3 Replies

4. Shell Programming and Scripting

awk script required

File 1 ################### TRAIU DSKDL; SLLA ;LAKJA KJAJA NSAJAN JANAL AJKJA JAJALA KAKAK JA AKA AKA AJ A A PPIN TRY1 SANT1 PPIN TRY2 SANT2 PPIN TRY3 SANT3 PPIN TRY4 SANT4 PPIN TRY5 SANT5 AJJA NA ANA ANHDJLD ALJALJA AJLJAJD LALJAL ALJALJA ALJALJA (4 Replies)
Discussion started by: jaita
4 Replies

5. Shell Programming and Scripting

Searching using awk - Help required

Hi... I am working on script to search some records in a file based on certain fields and each record is a ASCII fixed size. I was using awk to search based on certain condition. But the length of the record is too much that awk is giving syntax error near unexpected token `(' Request... (5 Replies)
Discussion started by: ysrikanth
5 Replies

6. Shell Programming and Scripting

Help required with awk/sed

Hi I have a file, with format like: column1|coulumn2|column3|column4 A|X|K|18 L|O|R|31,42,25 G|H|I|55,66 L|E|Q|25,31,94 output required: column1|coulumn2|column3|column4 A|X|K|18 L|O|R|31,25 L|E|Q|25,31 Input File Format: All columns are seperated using |, last column... (8 Replies)
Discussion started by: New to awk
8 Replies

7. Shell Programming and Scripting

Help required in sed or awk.

Hi All, I need to pick up data on both sides of "=" sign. For eg, following is the context that I have. 125.156.125.147=machine1 147.125.185.156=machine2 147.125.185.159=machine3 Can I have the ip address in one variable and machine name in another variable using sed or awk. ... (1 Reply)
Discussion started by: nua7
1 Replies

8. Shell Programming and Scripting

AWK script help required

Hello every one i have a very long file 'file1' like this <K>1</K> </Condition> <Tariff>Rate <Price>1.27</Price> <Interval>30</Interval> </Tariff> </Node> <Node>NonFaF <Tariff>Rate <Price>1.9</Price> <Interval>30</Interval> </Tariff> </Node> </Node> </Node> <Node>FaF (9 Replies)
Discussion started by: Dastard
9 Replies

9. Shell Programming and Scripting

Help required on awk

Hi, I have a fixed with file, which have almost 10 records Sample File: ------------ AR 100 TTT BC 200 SSS DA 199 YYY AR 500 RRR PO 300 QQQ PB 800 PPP PC 150 OOO AR 111 CCC AD 321 LLL I Have to check for first two charactors and if its 'AR' i have to save those records to one... (3 Replies)
Discussion started by: meetavin
3 Replies

10. UNIX for Dummies Questions & Answers

Help required on AWK command

I have two questions: (Q1) I am using a loop and want to print a particular field of a table using the AWK command by accessing one row at a time by validating NR with the loop counter. I am using a command like this but it isn't working! count=1 NAWK -F"|" -v var=$count 'NR == var { printf... (13 Replies)
Discussion started by: udiptya
13 Replies
Login or Register to Ask a Question