10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I have a requirement where I need to replace space :61 with !@ :61
Source
:60F:123 :61:151 :61:151 :61:15101
Target
:60F:123 :61:151!@:61:151!@:61:15101
I cant use and command as I don't want the tab to be converted .
commands not working :
sed 's/... (5 Replies)
Discussion started by: kamijia83
5 Replies
2. UNIX for Dummies Questions & Answers
I've got a sed shell script I've been using for quite a while to do batch find/replace operations on .xml files containing various types of text entries. This is the script I use:
#!/bin/bash
while read text_old text_new; do
sed_script+="s/$text_old/$text_new/g;"
done < trans_old_to_new... (9 Replies)
Discussion started by: Agreppa
9 Replies
3. UNIX for Dummies Questions & Answers
`echo $file | sed 's/ / /g'`
Hey guys I want help in converting the spaces in my file names to '\ ' .
Example:
UK maps --> UK\ maps
Could someone please help me.
I have tried the following sequences already (none of them work):
1)s/ /\ /g
2)s/ /\\ /g
3)s/ /\\\ /g
Can someone... (7 Replies)
Discussion started by: INNSAV1
7 Replies
4. Shell Programming and Scripting
Hi
I have written a shell script which used sed code below
sed -i 's/'"$Pattern"'/ /g' $FileName
I want to count the length of Pattern and replace it with equal number of spaces in the FileName.
I have used $(#pattern) to get the length but could not understand how to replace... (8 Replies)
Discussion started by: rakeshkumar
8 Replies
5. Shell Programming and Scripting
Dear All,
I am new here. Could anyone help to find a sed script for replace the third "," to " "?
input:
abc,def,ghi,jkl,mno,pqr,stu,vxz
output:
abc,def,ghi jkl,mno,pqr,stu,vxz
Many thanks.
Please use code tags next time for your code and data. (2 Replies)
Discussion started by: mimilaw
2 Replies
6. Shell Programming and Scripting
Hi,
i have below string -
mynameis arpit
i want output like below -
mynameis\ arpit
that i am getting from below -
temp='mynameis arpit'
echo $temp|sed 's//\\ /g' --> mynameis\ arpit
now i am doing - (2 Replies)
Discussion started by: thearpit
2 Replies
7. Shell Programming and Scripting
SHELL SCRIPT
Hi
I have a file in the following format
Mayank Sushant
Dheeraj Kunal
ARUN Samir
How can i replace the white space in between and replace them with a comma?? The resultant output should be
Mayank,Sushant
Dheeraj,Kunal
ARUN,Samir
i tried using
sed -e... (8 Replies)
Discussion started by: mayanksargoch
8 Replies
8. Shell Programming and Scripting
I have lines with:
elseif (req.http.host ~ "^(www.)?edificationtube.com$|www.edificationtube.org www.edificationtube.net edificationtube.org www.edificationtube.com edificationtube.net") {
elseif (req.http.host ~ "^(www.)?collegecontender.com$|www.collegecontender.com collegecontenders.com... (3 Replies)
Discussion started by: EXT3FSCK
3 Replies
9. Shell Programming and Scripting
I have a large file that looks like the below output:
system SUNWxwmod X Window System kernel modules
system SUNWxwoft X Window System optional fonts
system SUNWxwopt X Window System Optional Clients
system ... (1 Reply)
Discussion started by: hxman
1 Replies
10. Shell Programming and Scripting
I am searching while I await a response to this so if it has been asked already I apologize.
I have a file with lines in it that look like:
bob johnson email@email.org
I need it to look like:
bob:johnson:email@email.org
I am trying to use sed like this:
sed -e 's/ /:/g' file >... (5 Replies)
Discussion started by: NewSolarisAdmin
5 Replies