10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have 4000 files like
$cat clus_grp_seq10_g.phy
18 1002
anig_OJJ65951_1 ATGGTTTCGCAGCGTGATAGAGAATTGTTTAGGGATGATATTCGCTCGCGAGGAACGAAGCTCAATGCTGCCGAGCGCGAGAGTCTGCTAAGGCCATATCTGCCAGATCCGTCTGACCTTCCACGCAGGCCACTTCAGCGGCGCAAGAAGGTTCCTCG
aver_OOF92921_1 ... (1 Reply)
Discussion started by: sammy777888
1 Replies
2. Shell Programming and Scripting
Hi All
I am trying to run sed command to remove first 2 charcaters from a file on Multiple Files in my directory and what to retain the same file name .
I want to know how to retain the same file name but with changes .
Can some one please let me know how to proceed with this .
... (7 Replies)
Discussion started by: honey26
7 Replies
3. Shell Programming and Scripting
Hi,
How do I run multiple sed on a file similar to the below in one command?
I can't global substitute the 401 as it can occur elsewhere in the row and needs to
be maintained if it does.
sed "s/,40128/,128/" test2.csv > test3.csv
sed "s/,40192/,192/" test3.csv > test4.csv
sed ... (6 Replies)
Discussion started by: ksexton
6 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I will use below command for grep single string ("osuser" is search string)
ex: find . -type f | xarg grep -il osuser
but i have one more string "v$session"
here i want to grep in which file these two strings are present.
any help is appreciated,
Thanks in advance.
Gagan (2 Replies)
Discussion started by: gagan4599
2 Replies
5. Shell Programming and Scripting
What is the syntax to use multiple input files in a SED command. i.e. substitute a word with a phrase in every file in a directory.
for every file in /usr/include that has the word "date" in the file
grep -l '\<date\>' /usr/include/*.h
find each occurrence of the word "time" in the file &... (3 Replies)
Discussion started by: sheoguey
3 Replies
6. UNIX for Dummies Questions & Answers
Hi guys,
say I have a few files in a directory (58 text files or somthing)
each one contains mulitple strings that I wish to replace with other strings
so in these 58 files I'm looking for say the following strings:
JAM (replace with BUTTER)
BREAD (replace with CRACKER)
SCOOP (replace... (19 Replies)
Discussion started by: rich@ardz
19 Replies
7. UNIX for Dummies Questions & Answers
Hello all,
Search & replace works fine using sed on a single file.
Ex:
sed -i 's/day/night/g' test1.sh
There are many *.sh files in my current directory that I would like use sed on. I tried running the sed command using wild card but it did not work.
sed -i 's/day/night/g' *.sh
... (7 Replies)
Discussion started by: luft
7 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I want to do a search and replace on multiple text files. Can I use sed to do this?
i.e. I want to do something like:
$ sed *.html -e 's/<\/body>/<\!-- blah -->\n<\/body>/' | grep -1 body
... then pipe/ channel the results back into the same files that were searched.
how would... (2 Replies)
Discussion started by: mgrahamnz
2 Replies
9. Shell Programming and Scripting
HI,
I want to know can multiple pattern be given inside a sed statement..
Input:
aa_bb_cc.Mar-22-2007
cc_dd_ee.Mar-21-2007
aa_1002985_952.xml
aa_bb_032207.txt
aa_bb_cc_10002878.dat
Output:
aa_bb_cc
cc_dd_ee
aa.xml
aa_bb.txt
aa_bb_cc.dat (6 Replies)
Discussion started by: kumarsaravana_s
6 Replies
10. UNIX for Dummies Questions & Answers
I've got a bunch of files (40 or so) and in each there is a substitution I need to perform.
I execuet the following sed command but it just make the changes to the screen without affecting the original file.
sed "s/, LA/,LA/g" *
(All files in the directory need this update).
So I tried... (4 Replies)
Discussion started by: peter.herlihy
4 Replies