Sponsored Content
Top Forums UNIX for Dummies Questions & Answers using nawk to concate the fields Post 302161562 by shamrock on Friday 25th of January 2008 04:14:21 AM
Old 01-25-2008
Attach a portion of your input file as this will aid in why nawk isn't catenating the fields.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Concate all lines into one.

I have a file with 1000 records and I have to produce another file with 1 line which is a concatentation of all these records. Please help. (1 Reply)
Discussion started by: oracle8
1 Replies

2. Shell Programming and Scripting

Append tabs at the end of each line in NAWK -- varying fields

Hi, I need some help in knowing how I can append tabs at the end of each line... The data looks something like this: field1, field2, field3, field4 1 2 3 4 5 I have values in field1 and field 2 in the first row and I would like to append tab on field3 and field4 for the first row..and in... (6 Replies)
Discussion started by: madhunk
6 Replies

3. Shell Programming and Scripting

concate the record

how i can bring this file into three records in my sample text file there are thre records new records always start with Data File ================================================== samle file ================================================= Data File:... (7 Replies)
Discussion started by: aboorkuma
7 Replies

4. Shell Programming and Scripting

I need help counting the fields and field separators using Nawk

I need help counting the fields and field separators using Nawk. I have a file that has multiple lines on it and I need to read the file 1 at a time and then count the fields and field separators and then store those numbers in variables. I then need to delete the first 5 fields and the blank... (3 Replies)
Discussion started by: scrappycc
3 Replies

5. Shell Programming and Scripting

String concate problem

Hello there, I am facing the following problem in string concate. I am returning a sql column value to a shell script variable . Now when I am trying to concate the variable with another string (string appears first) I am getting a space between the two concate. Example p is the shell... (2 Replies)
Discussion started by: Pratik4891
2 Replies

6. Shell Programming and Scripting

nawk -- separation of records on basis of number of fields

A file file1.txt exists having records like The delimiter being "|" X|_|Y|_|Z|_| (number of fields 7) A|_|B|_| (number of fields 5) X|_|Z|_|H|_| (number of fields 7) A|_|D|_|S|_| (number of... (4 Replies)
Discussion started by: centurion_13
4 Replies

7. Shell Programming and Scripting

awk /nawk :: print the everything except the first and the last fields

format of file1 "file1.txt" 1 2 3 4 A B C XX YY ZZ AA WWW The output must contain except the first and last column the output must be 2 3 B YY ZZ AA (8 Replies)
Discussion started by: centurion_13
8 Replies

8. Shell Programming and Scripting

Counting Multiple Fields with awk/nawk

I am trying to figure out a way in nawk to 1) get a count of the number of times a value appears in field 1 and 2) count each time the same value appears in field 2 for each value of field 1. So for example, if I have a text file with the following: grapes, purple apples, green squash, yellow... (2 Replies)
Discussion started by: he204035
2 Replies

9. Shell Programming and Scripting

Concate a string in awk

Hello Community, i have a litte Problem with concating a string in an awk command. val_arr=( $( cat myfile | awk ' NR==1 { name=$2} NR==3 { dateformat=$9 OFS $6 OFS $8 OFS $7 OFS $10} NR==4 { length=$8} NR==5 { progress=int($3) } END{print name,dateformat,length,progress}; ... (6 Replies)
Discussion started by: demonking
6 Replies

10. UNIX for Advanced & Expert Users

Nawk coding trying to compare two fields in a file

I have a file. We can call file1. It has these contents. STOPLOSS Control_file 0000000010.000 STOPLOSS Audit_file_Signoff +0000000010.00 nawk '{ fmt="%3s %15s %15s %15s %21s\n"; if ($3==$6) { tpy="Successful Match"; jnme=$1;... (4 Replies)
Discussion started by: wawa
4 Replies
VDE_AUTOLINK(1) 						   User Commands						   VDE_AUTOLINK(1)

NAME
vde_autolink - automatically create and maintain vde connections DESCRIPTION
-h, --help Display this help -f, --rcfile Configuration file (overrides /etc/vde_autolink.rc and ~/.vde_autolinkrc) -d, --daemon Daemonize vde_autolink once run -p, --pidfile PIDFILE Write pid of daemon to PIDFILE -M, --mgmt SOCK Path of the management UNIX socket --mgmtmode MODE Management UNIX socket access mode (octal) -s, --sock [*] Attach to this vde_switch socket -S, --switchmgmt [*] Attach to this vde_switch management socket [*] == Required option! -h, --help Display this help -f, --rcfile Configuration file (overrides /etc/vde_autolink.rc and ~/.vde_autolinkrc) -d, --daemon Daemonize vde_autolink once run -p, --pidfile PIDFILE Write pid of daemon to PIDFILE -M, --mgmt SOCK Path of the management UNIX socket --mgmtmode MODE Management UNIX socket access mode (octal) -s, --sock [*] Attach to this vde_switch socket -S, --switchmgmt [*] Attach to this vde_switch management socket [*] == Required option! NOTICE
Virtual Distributed Ethernet is not related in any way with www.vde.com ("Verband der Elektrotechnik, Elektronik und Informationstechnik" i.e. the German "Association for Electrical, Electronic & Information Technologies"). SEE ALSO
vde_switch(1), vde_plug(1), AUTHORS
VDE is a project by Renzo Davoli <renzo@cs.unibo.it>. vde_autolink is a VDE component by Luca Bigliardi vde_autolink 2.2.0-pre1 November 2007 VDE_AUTOLINK(1)
All times are GMT -4. The time now is 08:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy