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!
I have a file with the following format:CDR
...
MSISDN=111
...
CDR
...
MSISDN=xxx
...
CDR
...
MSISDN=xxx
...
CDR
...
MSISDN=111 (2 Replies)
Discussion started by: Flavius
2 Replies
3. Shell Programming and Scripting
Hi Folks,
Could you please advise what will be the SED command to replace a word in all xml's under a particular directory
for example let say I rite now at the following below location
$ cd /ter/rap/config
now under config directory there will be lots of xml file , now my objective is to... (1 Reply)
Discussion started by: punpun66
1 Replies
4. Shell Programming and Scripting
I use SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
We have a user-defined command called "submit" which will open a vi terminal in which we need to enter the description at 24th line and save it.
In order to simplify this, i decided to create another command in which the... (3 Replies)
Discussion started by: pandeesh
3 Replies
5. Shell Programming and Scripting
Why does the below command doesnt work fine on SunOS 5.10
$ cat t
| AK| | | | | DS | | | | tAR | | | | | FIL |
$ sed -e 's/^ *//g' -e 's/ *$//g' -e 's/ *| */|/g' t
|AK|||||DS|||| tAR|||||FIL|
##notice before tAR
works fine on Linux OR AIX though
... (8 Replies)
Discussion started by: Shivdatta
8 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have gone through may posts and dint find exact solution for my requirement.
I have file which consists below data and same file have lot of other data.
<MAPPING DESCRIPTION ='' ISVALID ='YES' NAME='m_TASK_UPDATE' OBJECTVERSION ='1'>
<MAPPING DESCRIPTION ='' ISVALID ='NO'... (11 Replies)
Discussion started by: tmalik79
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
Hi All,
I am trying to cut to do a cut operation, but since there are seems to be more than one deltimiters in some occasion I am not able to get the exact field. Can you please provide an SED and AWK script for treating the source file in such a way that all consecutive delimiters are treated... (3 Replies)
Discussion started by: rakesh.su30
3 Replies
9. Shell Programming and Scripting
Hi guys, not that used to using sed beyond the simple substitution. I am trying to check for a program (program1) and if it exists replace the standard output "program1" with a "program1(part1 part2) output if said program exists.
SW="program1 program2"
PROGRAM_TEST='echo "$SW" | grep... (3 Replies)
Discussion started by: mikepegg
3 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