10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I would need to replace a delimiter in a flat file using.I would like to replace the semicolon (";") but only if it was contained in a string between quotes. For example:
Original flat file example:
abc;abc;"abc;abc";cd;"ef;ef";abc
aa;bb;"aa";cc;"ddd;eee";ff
Desired output:... (9 Replies)
Discussion started by: bartleby
9 Replies
2. Shell Programming and Scripting
Hi one of the output of the command is as below
# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'
Resource List : <br>
*************************** 1. row ***************************<br>
... (2 Replies)
Discussion started by: vivek d r
2 Replies
3. Shell Programming and Scripting
Basically , i want to delete strings of a particular pattern from the flat file which is " | " pipe delimited.
Below are the valid formats :
1) AAA (0) 111-111-111, AAA, BB
2) AAA (0) 111-111-1111;X, AAA, BB
original flat file example :
|ABC ABC XHAMK|AAA (0) 111-111-111, AAA,... (3 Replies)
Discussion started by: Ravi_007
3 Replies
4. Shell Programming and Scripting
I have a line of text for example
aaaa bbbb cccc dddd eeee ffffff
I would need to get the cccc however bbbb could be there or not.
So whether bbbb is in the line or not I need cccc.
I was looking at either awk or sed....and trying to start at c and end until the next space.
Also... (11 Replies)
Discussion started by: bombcan1
11 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I need to delete all text between "|" delimiters. The line in text file typically looks like this:
1014182| 13728 -rw-r--r-- 1 imac1 staff 7026127 2 okt 2010 |/Users/imac1/Music/iTunes/iTunes Media/Music/Various Artists/We Are the World_ U.S.A. for Africa/01 We Are the World.mp3... (2 Replies)
Discussion started by: andrejm
2 Replies
6. 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
7. Shell Programming and Scripting
Hi,
I am facing difficulties in selecting the contents between two delimiters when there is a new line occurs..
Eg:
>more sample.txt
abcd -- this is the first line %
efgh-- this is the
second line and not
able to print %
ijkl -- this is the 3rd line %
when i search for abcd and... (8 Replies)
Discussion started by: Balaji PK
8 Replies
8. Shell Programming and Scripting
Hi
I am trying to fetch the rows with match string "0000001234"
Input file looks like below:
09 0 XXX 0000001234 Z 1
09 0 XXX 0000001234 Z 1
09 0 XXX 0000001234 Z 1
09 0 XXX 0000001234 Z 1
09 0 XXX 0000001234 Z 1... (6 Replies)
Discussion started by: nareshk
6 Replies
9. Shell Programming and Scripting
I need to extract certain pieces from a string, wher delimiters may vary. For example
A0 B0 C0 12345677 X0 Y0 Z0
A1-B1 C1 12345678 X1 Y0 Z0
A1/B2 C77 12345679 X2 Y0 Z0
I need to get
C0 12345677 X0
C1 12345678 X1
C77 12345679 X2
I tried sed, see example below:
echo 'A0 B0... (2 Replies)
Discussion started by: migurus
2 Replies
10. Shell Programming and Scripting
Hi There!
I have the following string
which i need to convert to
i.e. between each occurence of the delimiter ('|' in this case), i need to delete all characters from the '|' to the ':' so that |10,9:12/xxx| becomes |12/xxx|
How can i do this using sed?
Thanks in advance! (13 Replies)
Discussion started by: orno
13 Replies