10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hey guys,
I have a file that is delimited by | and I am trying to write a sed command to
convert this:
abc|def||ghi|jkl||||mnop
into this:
abc|def|-|ghi|jkl|-|-|-|mnop
The output I am getting out of:
sed -e "s/+//g" /tmp/opt.del > /tmp/opt2.del
is like:
... (9 Replies)
Discussion started by: prohank
9 Replies
2. Shell Programming and Scripting
Hi All,
my file has following Data
04:38:34
02:03
24:40
02:09:58
09:13
03:04:11
02:09:58
35:00
I want to display only lines with 3 fields.
ie..
04:38:34
02:09:58
03:04:11 (6 Replies)
Discussion started by: Arunselvan
6 Replies
3. Shell Programming and Scripting
Hi,
I have a requirement where in I need to insert delimiters before the last column of the total delimiters is less than a specified number.
Say if the delimiters is less than 139, I need to insert 2 columns ( with blanks) before the last field
awk -F 'Ç' '{ if (NF-1 < 139)} END { "Insert 2... (5 Replies)
Discussion started by: arunkesi
5 Replies
4. Shell Programming and Scripting
Having a huge file in the following format.
2,3,1,,,4
1,2,3,,,,,5,
8,7,3,4,,,,
Output needed is:
2,3,1,0.0,0.0,4
1,2,3,0.0,0.0,0.0,0.0,5,
8,7,3,4,0.0,0.0,0.0,
I have tried reading the file each line, using AWK to parse to find out ",," and then insert 0.0 . It works but very slow. Need... (8 Replies)
Discussion started by: wincrazy
8 Replies
5. Shell Programming and Scripting
I have email headers that look like the following. In the end I would like to accomplish sending each email address to its own variable, such as:
user1@domain.com='user1@domain.com'
user2@domain.com='user2@domain.com'
user3@domain.com='user3@domain.com'
etc...
I know the sed to get rid of... (11 Replies)
Discussion started by: tay9000
11 Replies
6. Shell Programming and Scripting
Hi,
I have a problem to concatenate the lines based on number of delimiters (if the delimiter count is 9 then concatenate all the fields & remove the new line char bw delimiters and then write the following data into second line) in a file.
my input file content is
Title| ID| Owner|... (4 Replies)
Discussion started by: bi.infa
4 Replies
7. Shell Programming and Scripting
Can someone please help?I have a file - fixed.txt----------------------------AABBBBCCCCCCDDDEEFFFFGGGGGGHHHIIJJJJKKKKKKLLL----------------------------To insert delimiters at fixed lengths of 2, 4, 6, 3, I created a file text1.txt as-------------------2463----------------------and trying to execute... (10 Replies)
Discussion started by: jd_mca
10 Replies
8. Shell Programming and Scripting
Hi All,
I am struggling to get my head around the following issue.
I am having to comment out lines between two delimiters by placing an asterix in position 7 but retain all lines in the file and in the same order.
so for example a file containing:
...
...
DELIM1
...
...
DELIM2... (2 Replies)
Discussion started by: Bruble
2 Replies
9. Shell Programming and Scripting
Hi,
I am having huge file with the following lines.
2007:10:01:00:00:49:GMT: subject=BMRA.BM.T_ABTH7.FPN, message={SD=2007:10:01:00:00:00:GMT,SP=5,NP=2,TS=2007:10:01:01:00:00:GMT,VP=0.0,TS=2007:10:01:01:30:00:GMT,VP=0.0}
2007:10:01:00:00:49:GMT: subject=BMRA.BM.T_ABTH7G.FPN,... (9 Replies)
Discussion started by: nathasha
9 Replies
10. UNIX for Dummies Questions & Answers
Hi,
Newbie here. Need to convert a txt file to .csv format. There's no character to replace so not sure if I can use sed :confused: . The comma is to be inserted after every certain number of characters in each line...
Help!
Thanks. (4 Replies)
Discussion started by: mbelen
4 Replies