10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have many CSV files with variable number of rows and columns.
Sample of few problematic CSV files.
,,Price,Price,Price,Price,Price,Price,Price,Price,Price,Qty
Date,Sl,AAA,BBB,CCC,DDD,EEE,FFF,GGG,HHH,PriQueue,%busy
30/07/2014,1,AAA,BBB,CCC,DDD,EEE,FFF,GGG,HHH,NA,0... (8 Replies)
Discussion started by: reddyr
8 Replies
2. Shell Programming and Scripting
How could be removed \n only if appearing at position 80 in the line? (4 Replies)
Discussion started by: RomanF
4 Replies
3. Shell Programming and Scripting
Hi,
I have a file where I want to replace the 15th field separated by comma, only on specific lines matching lots of different conditions.
I have managed to read the file line by line, within the loop my line is held in a variable called $line
I assume this will be using sed (maybe... (5 Replies)
Discussion started by: jpt123
5 Replies
4. Shell Programming and Scripting
I need to read the contents of a file. Then I need to grep for a keyword and replace part of the grepped line based on the condition of previous and present line.
Example input file:
V {
port1 = P;
port2 = 0;
shift_port = P0; /* if next shift_port is P0 I need... (9 Replies)
Discussion started by: naveen@
9 Replies
5. Shell Programming and Scripting
Hello,
I'm new to this forum but this seems like the place to ask this question.
I have a pipe delimited data file with the fields except for the header being encased in double quotes. I found out that some of the fields have an trash pipe within the data itself. I'd like to conditionally... (4 Replies)
Discussion started by: samahs
4 Replies
6. Shell Programming and Scripting
Hi all,
I need a bash, sed, awk script or one liner to do the following task:
This is the format of a text file:
2010-06-11 20:01 902656 HOP-W-100412-1.doc
2010-11-05 18:01 364447 NEX-W-101104-1
2010-07-06 10:01 64512 Cerintele
2010-07-06 10:01 599420 content
2010-07-19 14:01 1785344... (7 Replies)
Discussion started by: supervazi
7 Replies
7. Shell Programming and Scripting
Hi
I am struggling to find a solutions to this problem:
I have a directory full of files and I wish to:
read each line of each file and
if any one line in those files is longer than 72 characters I want to replace any tab characters with a space character.
Ive been... (3 Replies)
Discussion started by: benackland
3 Replies
8. Shell Programming and Scripting
I have a file called config.xml, it's a simple xml file, and I need use sed/awk to erase some lines.
<machine xsi:type="unix-machineType">
<name>server1</name>
<node-manager>
<name>server1</name>
<listen-address>server1</listen-address>
</node-manager>
... (3 Replies)
Discussion started by: cbo0485
3 Replies
9. Shell Programming and Scripting
Hi all,
I appreciate the enormous amount of knowledge that flows in this forum.
I am an average UNIX user. I have many files with lines like the below. I have separated each line with space for ease of reading. I need to replace the first occurance of "/00" with null on those lines that have... (6 Replies)
Discussion started by: Nanu_Manju
6 Replies
10. Shell Programming and Scripting
Hi using the below cmd i am identifying wheether last character in each line in thousands of files as semicolon or not.If last character is semicolon i am removing semicolon .If last character is not semicolon then i am appending next line to present line .
For example my input file consists of... (4 Replies)
Discussion started by: dbsurf
4 Replies