10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a text file where each field is enclosed in double quotes and separated by a comma.
But in certain rows we have embedded double quotes within column data
For e.g
"""TRUSPICE CENTRE"" CLAYTON AU"
The above value is for a single column but there are embedded quotes within... (2 Replies)
Discussion started by: abhilashnair
2 Replies
2. Shell Programming and Scripting
Hello,
Is it possible to handle data from two different files at once in awk (latest version and platform is Fedora). I found on the net that we cannot nest awk. My requirement is that I have two similar files :
File 1:
Name: abc
Val = 58
Name: cdf
Val = 1;
..................
File... (7 Replies)
Discussion started by: fifteate
7 Replies
3. UNIX for Dummies Questions & Answers
Hi. We have some data that's generated from a webpage. Part is pretty well-formatted, but part of it preserves newlines in a way that breaks the record separating in awk. Here's 2 records, filtered through cat -e:
Jones,Bob,20,Q: What is your favorite ice cream?$
A: Butter Pecan$
Q: Do you... (6 Replies)
Discussion started by: treesloth
6 Replies
4. Shell Programming and Scripting
I have a file like below.
colA^col2^col3^col4^col5
aa^11^aaa^a1a^111^aa*
bb*^22^bbb*^bb2^222^bb
cc^33^ccc*^3cc^333^ccc
dd^44^d*dd*^d4d^444^ddd
ee^55^e*ee^e5e*^555^e*e
NOTE: '^' is the field separator.
I need to get the output as
colA^col2^col3^col4^col5
aa^11^aaa^a1a^111^aa... (5 Replies)
Discussion started by: rinku11
5 Replies
5. Shell Programming and Scripting
Hi,
I have requirement to fetch lines with a particular character in one column
e.g.
2.5M asdsad
3.5M sadsadas
12323M ssdss
i tried following so far
#echo 2.3M asdsad | nawk -F " " '{print substr($1,length($1))}'
M
So far i have tried following
# echo 2.3M asdsad | nawk... (4 Replies)
Discussion started by: mtomar
4 Replies
6. UNIX for Advanced & Expert Users
Hi all,
I have input lines like below
empno,ename,sal,description
----------------------------
311,"jone,abc",2000,manager
301,david,200,"president,ac"
I need to sum the salary of them i.e. 2000+200
anything suggested
Thanks,
Shahnaz.
Use code tags. (5 Replies)
Discussion started by: shahnazurs
5 Replies
7. Shell Programming and Scripting
Hi,
I have an issue that I am trying to resolve using arrays in awk. I have two files, the first one is a dictionary with this format:
FILE 1 (dictionary)
'Abrir' 'Open'
'Aceptar' 'Accept'
Every line has two fields, a word in two languages.
The second file is a simple list of... (3 Replies)
Discussion started by: gmartinez
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a small requirement where i need to sum up a column in a text file.
Input file
66ab 000000 534385 -00000106350.00
66cd 000000 534485 -00013364511.00
66ad 000000 534485 -00000426548.00
672a 000000 534485 000000650339.82... (5 Replies)
Discussion started by: pssandeep
5 Replies
9. Shell Programming and Scripting
Script is: accept filename as argument(also handle CTRL+C).to check whether th file exist in the current directory,it it then using awk find the employees who are either born in 1990 or drawing a salary greater than 25000.
In my database file 1st field is of id ,2nd field is name,5th field is of... (5 Replies)
Discussion started by: Priyanka Bhati
5 Replies
10. Shell Programming and Scripting
Hi,
Can someone let me know how I can acheive the following.
I have ~ delimited file and I need to convert into something like SQL insert statements.
SrcFile :
1~sjdsdj~asasas~
2~aaaaa~qwqwqwq~qwq
.....
I tried
AWK -F"~" '{print "INSERT INTO XX VALUES("$1 " ,\' "$2" \' , \' "$3 }'... (3 Replies)
Discussion started by: braindrain
3 Replies