10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
hi all,
i'd like to modify a file with sed , i want to substuite a char "-" with "/"
how can i do this?
Thanks for all
regards
Francesco (16 Replies)
Discussion started by: Francesco_IT
16 Replies
2. Shell Programming and Scripting
Hi I have a source file that looks like
a,b,c,d,e,f,g,h,t,DISTI(USD),MSRP(USD),DIST(EUR),MSRP(EUR),EMEA-DISTI(USD),EMEA-MSRP(USD),GLOBAl-DISTI(USD),GLOBAL-MSRP(USD),DISTI(GBP), MSRP(GBP)
I want to basically change MSRP(USD) to MSRP,USD and DIST(EUR) to DIST,EUR and likewise for all i'm using... (3 Replies)
Discussion started by: r_t_1601
3 Replies
3. Shell Programming and Scripting
Hi experts :)
I need to replace special characters into a file , in the followiing way :
" --> ""
' --> ''
_--> \_
I tried with the sed command but I'm getting and error ksh: $: not found.
ksh: $: not found.
sed: Function s/\/\/ cannot be parsed.
Any idea ?
Thanks ,
KOLAS... (2 Replies)
Discussion started by: Kolas79
2 Replies
4. Shell Programming and Scripting
I am trying to do what I thought should be a simple substitution, but I can't get it to work.
File:
Desire output:
I thought I'd start with a sed command to remove the part of the header line preceding the string "comp", then go on to remove the suffix of the target string (e.g. ":3-509(-)"),... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
5. Shell Programming and Scripting
Hi ,
I am working on a script to replace special characters in ASCII file with '?'.
We need to get count of replaced characters from file. I am new to Awk and i read,
# The gsub function returns the number of substitutions made.
I was trying to replace characters with below... (10 Replies)
Discussion started by: Akshay
10 Replies
6. UNIX for Dummies Questions & Answers
I'm using sed to perform a simply search and replace. The typical data is:
<fig><image href="Graphics/BAV.gif" align="left" placement="break"
I need to replace the value in the first set of quotes, keeping the remainder of the line the same. Thus:
<fig><image href="NEW_VALUE" align="left"... (3 Replies)
Discussion started by: Steve_altius
3 Replies
7. Shell Programming and Scripting
Hi there,
I'm trying to write a bash script and I have some difficulties...
I have multiple files, which have the following names:
file_1.txt
file_2.txt
...
file_26.txt
Within each file there is some information, like:
(in the file_1.txt) name of the file: file_name_1_info.hdr
(in... (4 Replies)
Discussion started by: giorgos193
4 Replies
8. Shell Programming and Scripting
I am trying to get rid of some ending tags but I run into some problems.
Ex.
How are you?</EndTag><Begin>It is fine.</Begin><New> Just about
I am trying to get rid of the ending tags, starts with </ and ending with >. (which is </EndTag> and </Begin>)
I tried the following
sed... (2 Replies)
Discussion started by: quixoticking11
2 Replies
9. Shell Programming and Scripting
Hi All,
I'm currently using SED to make various changes to some .xml files I'm working on, but I'm stuck on this particular problem.
I want to remove '<placeholder>element-name</placeholder>' from the following:
<heading>Element <placeholder>element-name</placeholder> not... (2 Replies)
Discussion started by: Steve_altius
2 Replies
10. UNIX for Dummies Questions & Answers
I am having a problem executing a sed substitute in a file. I have tried alot of different things I found in previous posts, however non seem to work.
I want to substitute this in $FILE:
VALUE=33.4
In the script I have tried the following:
prev=$(awk -F"=" '{ print $2 }' $FILE )
new=$(echo... (16 Replies)
Discussion started by: newbreed1
16 Replies