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. UNIX for Dummies Questions & Answers
I have a single record large file, semicolon ';' and pipe '|' separated. I am doing a vi on the file. It is throwing an error "File to long"
I need to actually remove the last | symbol from this file.
sed -e 's/\|*$//' filename
is working fine for small files. But not working on this big... (13 Replies)
Discussion started by: Gurkamal83
13 Replies
3. 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
4. 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
5. 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
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. Shell Programming and Scripting
Dear Scripting experts,
I have a problem which i cannot get my head around and wondered if anyone can help me. I have two files "file1" and "file2" and i want to replace column one from file 1 with column one with file2.(where file two has many columns). see example.. ive tried to use cut and... (4 Replies)
Discussion started by: Mish_99
4 Replies
9. UNIX for Dummies Questions & Answers
Hi
I am in need to find a solution the following problem
I have more 3 unix based servers. Each handling many different services.
Then I have 1 windows based application that needs to collect the .log files in /tmp on the servers.
The plan I initially thought of will be to open ftp... (1 Reply)
Discussion started by: ionix
1 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