10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
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
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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