10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
Please support
I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6.
... (3 Replies)
Discussion started by: as7951
3 Replies
2. Shell Programming and Scripting
Hello Gurus,
I wanted to put a single quote in every where starting with /oradata, and at the end with .dbf.
For example I have one line as below:
alter database rename datafile /oradata/test.dbf to /oradata_new/test.dbf I wanted as below
alter database rename datafile '/oradata/test.dbf' to... (3 Replies)
Discussion started by: pokhraj_d
3 Replies
3. Shell Programming and Scripting
From:
1,2,3,4,5,This is a test
6,7,8,9,0,"This, is a test"
1,9,2,8,3,"This is a ""test"""
4,7,3,1,8,""""
To:
1,2,3,4,5,This is a test
6,7,8,9,0,"This; is a test"
1,9,2,8,3,"This is a ''test''"
4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Discussion started by: Michael Stora
5 Replies
4. Shell Programming and Scripting
Hi,
I have a list of tables in a file.txt
C_CLAIM
C_HLD
C_PROVIDER
I want the output to be
'C_CLAIM','C_HLD','C_PROVIDER'
Currently I'm usin awk and getting output which is almost correct but still has minor defects
awk -vORS="','" '{ print $1 }' file.txt
The output of... (4 Replies)
Discussion started by: wahi80
4 Replies
5. Shell Programming and Scripting
Hi,
I want to change a file file1.txt:
1234
3456
2345
6789
3456
2333
4444
As, file2.txt in Linux:
'1234','3456','2345','6789','3456','2333','4444'
Could someone please help me. (Single liner sed, awk will be welcome!) (7 Replies)
Discussion started by: wiweq05
7 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I have a set of data as below :
XS012371378 Raj 23-09-12
SH128238948 Andrew 24-08-12
CH273712399 Walsh 12-10-12
JK7249923893 Nick 10-02-13
JP6383791389 Braslin 30-12-13
I want the first column to be extracted separately. I can get this using awk.
awk '{print $1}' file_name
... (3 Replies)
Discussion started by: Nand Kishor
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a large number of files which are written as csv (comma-separated values).
Does anyone know of simple sed/awk command do achieve this?
Thanks!
---------- Post updated at 10:59 AM ---------- Previous update was at 10:54 AM ----------
Guess I asked this too soon. Found the... (0 Replies)
Discussion started by: lost.identity
0 Replies
8. Shell Programming and Scripting
Hello there,
I have a comma separated csv , and all the text field is wrapped by double quote. Issue is some text field contain comma as well inside double quote. so it is difficult to process.
Input in the csv file is ,
1,234,"abc,12,gh","GH234TY",34
I need output like below,... (8 Replies)
Discussion started by: Uttam Maji
8 Replies
9. Shell Programming and Scripting
I have a file as:
1
New
used
1
used
New
I need o/p as:
'1'
'New'
'used'
'1'
'used'
'New' (12 Replies)
Discussion started by: karumudi7
12 Replies
10. Shell Programming and Scripting
Hi,
I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file:
Name = "abc"
The regex I'm using to match the same is:
egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
Discussion started by: NanJ
6 Replies