10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have one big file of size 9GB (big_file.txt). This big file has sentences and paragraphs like any usual English document. I have another file consisting of replacement strings for sed to use. The file name is replace.sed and each entry in one line looks like this:
s/\<shout\>/shout/g
s/\<b is... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
2. 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
3 Replies
3. UNIX for Dummies Questions & Answers
Hi All
I have a simple text file and I want to be able to replace any alpha character and comma combination with any other symbol of my choice
here is the text file I want to replace:
pear
apple
ban,ana
grape
",g1234,"
te,st1
here is how it should look afterwards:
pear... (4 Replies)
Discussion started by: greg_b
4 Replies
4. OS X (Apple)
Hi, I'm and Android developer using Mac OSX 10.7. I use Dsixda's Android Kitchen to develop my roms. I had it working fine on 10.6.8 and it still worked flawlessly when updating to 10.7. I installed Macports, and installed some packages, and then tried to run the Android Kitchen. I CD'd to the... (3 Replies)
Discussion started by: dmeadows013
3 Replies
5. Shell Programming and Scripting
hi,
im new for sed, anyone can help me to these in sed command
my output file.txt
"aaa",a1,bbb
"ddd",a1,ccc
"eee",a1,www
need to change a1, to "a1","
output i need
"aaa","a1","bbb
"ddd","a1","ccc
"eee","a1","www
thanks in advance
fsp (2 Replies)
Discussion started by: fspalero
2 Replies
6. Shell Programming and Scripting
please help in making sed singleline command
i need to insert dos new line (CR LF) before
" 34 matching device(s) found on \\cpu1."
" 6 matching device(s) found on \\cpu7."
" 102 matching device(s) found on \\mainserver."
the problem is that sometimes there are both CR LF before strings and... (1 Reply)
Discussion started by: xserg
1 Replies
7. Shell Programming and Scripting
Hi,
In a file FILE, the following lines appear :
WORD 8 8 8
ANOTHERWORD blabla
...
Directly in the prompt, if I type
$sed '/WORD/s/8/10/g' FILE
it replace the 8's by 10's in file :
$cat FILE
WORD 10 10 10
ANOTHERWORD blabla
... (9 Replies)
Discussion started by: tipi
9 Replies
8. UNIX for Dummies Questions & Answers
Is there a way to use the sed command to
1) search a specified pattern
2) in the line where that pattern is found, replace from character N to character N+4 with a new 4-character string.
Thks in advance! (5 Replies)
Discussion started by: mvalonso
5 Replies
9. UNIX for Dummies Questions & Answers
Hello Folks,
Anyone know how I can replace this line in file.xml
<oacore_nprocs oa_var="s_oacore_nprocs">8</oacore_nprocs>
with this line
<oacore_nprocs oa_var="s_oacore_nprocs">1</oacore_nprocs>
using sed or awk ?
Thanks for your time.
Cheers,
Dave (7 Replies)
Discussion started by: d__browne
7 Replies
10. Shell Programming and Scripting
Hi folks,
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
6 Replies