10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I know how to use sed for simple search but i need to search something like below in a file.
From the below string, i need to find and replace only ./ with a $ using sed.
Thanks in advance
KK (8 Replies)
Discussion started by: Pavan Kumar19
2. Shell Programming and Scripting
I would like to export the 5th line from every file within a directory. I am using GNU sed because we have no Unix or Linux environment. I used the following statement:
sed -s -n 5p c:\directory\*.*
but I only get the 5th line from one of the files in the directory. I am desperate for a... (1 Reply)
Discussion started by: hollingv
3. Shell Programming and Scripting
Hi guys, thanks for accepting me in your forum .. I am trying to clean some hacked PHP files using SSH .. I am using this command:
find . -type f -print0 | xargs -0 sed -i '/god_mod/d'
<?php ... (3 Replies)
Discussion started by: wisam74us
4. Shell Programming and Scripting
I have a file of the following
I would like to do a wc for the lines starting with >
For the above example, the result is 3.
... (2 Replies)
Discussion started by: jacobs.smith
5. Shell Programming and Scripting
I am a newbie and would like some help with the following -
Trying to search fileA for a string similar to -
AS11000022010 30.4 31.7 43.7 53.8 60.5 71.1 75.2 74.7 66.9 56.6 42.7 32.5 53.3
I then want to replace that string with a string from fileB - ... (5 Replies)
Discussion started by: ncwxpanther
6. Shell Programming and Scripting
basically I am been cleaning data by using simple sed commands
So what i have below has been working for me.
sed 's/="//g' trade.csv > tradeb.csv
sed 's/"//g' tradeb.csv > trade2.csv
but now i don't want to remove all the quotes just the ones if i encounter this ... (1 Reply)
Discussion started by: raz0r
7. UNIX for Dummies Questions & Answers
I have a very large file in which a certain numbers are repeated. I find that using vi to edit the entire file is useless.
How should i use sed to find a replace such as this text:
To replace: 145.D25.D558
I tried this command:
sed... (4 Replies)
Discussion started by: DallasT
8. UNIX for Dummies Questions & Answers
I'm not sure if the problem I'm seeing is an artifact of sed or simply a beginner's mistake. Here's the problem: I want to add a zero-width space following each underscore between XML tags. For example, if I had the following xml:
It should look like... (8 Replies)
Discussion started by: rhetoric101
9. UNIX for Dummies Questions & Answers
Anyone know how I can replace this line in file.xml
with this line
using sed or awk ?
Thanks for your time.
Dave (7 Replies)
Discussion started by: d__browne
10. Shell Programming and Scripting
I need to search and replace specific text in a file and replace it. I have a text file that does not have any newlines or carriage returns. All newlines have been removed. Here is what I need to do.
Find the exact string “DH” (quotes included) and replace it with \n”DH” (basically... (6 Replies)
Discussion started by: bridgeje