10 More Discussions You Might Find Interesting
1. Programming
I can find and replace text when the delimiters are unique. What I cannot do is replace text using two NON-unique delimiters:
Ex.,
"This html code <text blah >contains <garbage blah blah >. All tags must go,<text > but some must be replaced with <garbage blah blah > without erasing other... (5 Replies)
Discussion started by: bedtime
5 Replies
2. 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
3. UNIX for Dummies Questions & Answers
Hi All,
How to Replace the delimiter for a particular field. I have used awk to replace the field values based on the position, but I tried to remove/replace delimiters with space on particular positions.
I tried tr command with combination of awk not sure if this is the correct way, but I am... (3 Replies)
Discussion started by: mora
3 Replies
4. Shell Programming and Scripting
Hi All,
i have file name like below
ABC_065224_123456_123456_your_130413_163005.txt
ABC_065224_123456_MAIN_20130413_163005.txt
ABC_065224_123456_123456_MAIN_130413_163005.txt
ABC_065224_123456_123456_434567_MAIN_130413_163005.txt
i need to find out the number of characters in the filed... (6 Replies)
Discussion started by: dssyadav
6 Replies
5. Shell Programming and Scripting
Hi ,
I have a number say 12345001 which needs to be parsed. Its a number that has no delimiters.I have to read the last three digits and then the rest of digits irrespective of the total length of the number. The digits then have to be swapped and changed to a fixed length. The fillers to be... (10 Replies)
Discussion started by: Sheel
10 Replies
6. 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
7. 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
8. 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
9. Shell Programming and Scripting
Hi,
I need to mass delete the following string(s) from my files
weight=100,
However the '100' is variable e.g
Current:
----------------
moretext=bar, weight=100, moreinfo=blah
extrastuff=hi, weight=9999, extrainfo=foo
Desired:
------------------
moretext=bar, moreinfo=blah... (2 Replies)
Discussion started by: rebelbuttmunch
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