10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a many folders in a directory under which there are many subdirectories containing text files containing the word "shyam" in them.I want all the files in all the directories containing "shyam to "ram" ??
sed "s/shyam/ram/g" does it ??But anyone can help me with the script ??
... (3 Replies)
Discussion started by: Pradeep_1990
3 Replies
2. Shell Programming and Scripting
Hi,
I have a file containing the DDLs of tables in a schema. From that I need to remove all the lines from a starting string till a specific string. Here is an example.
File1.txt
-------------
CREATE TABLE "SCHEMA1"."LKP11_TBL_USERS"
( "ID" NUMBER(8,0) NOT NULL ENABLE,
"USER_ID"... (3 Replies)
Discussion started by: satyaatcgi
3 Replies
3. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
4. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies
5. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Discussion started by: tuathan
5 Replies
6. UNIX for Dummies Questions & Answers
Dear all,
I have a file like below. I want to replace all the '.' in the 3rd column with 'NA'. I don't know how to do that. Anyone has an iead? Thanks a lot!
8 70003200 21.6206
9 70005700 17.5064
10 70002200 .
11 70005100 19.1001
17 70008000 16.1970
32 70012400 26.3465
33... (9 Replies)
Discussion started by: forevertl
9 Replies
7. Shell Programming and Scripting
Hi,
I need to replace the string 'abcd' with 'xyz' in a file sample.xml
This sample.xml is also present in the subdirectories of the current directory.
Eg,
If I am in /user/home/
the sample.xml if present in
/user/home/
/user/home/folder1/
/user/home/folder2/... (3 Replies)
Discussion started by: arulanandsp
3 Replies
8. Shell Programming and Scripting
Hi all,
I am newbie in unix. Just have some doubts on how to join multiple lines into single line.
I have 1 file with following contents.
R96087641
HostName-kul480My
This is no use any more
%%
E78343970
LocalPath-/app/usr/SG
(Blank in this line)
%%
E73615740... (4 Replies)
Discussion started by: whchee
4 Replies
9. Shell Programming and Scripting
hi,
i've found a few examples of scripts to do this but for some reason can't get them to work properly.
basically i have some dirs with a few hundred files mixed in with a bunch of other files that were made with a typo in part of them.
long-file-names-tyo-example.ext
want to be able... (2 Replies)
Discussion started by: kevin9
2 Replies
10. Shell Programming and Scripting
hii,
i need a unix command which replaces all occurrences of a substring within a string with another substring.
My solution:
string="plalstalplal"
sub1="al"
sub2="mlkl"
echo sed 's/$s2/$s3/g' < s1 > p
i want to know how to read the variables s2 and s3..
thaks a lot
bye (1 Reply)
Discussion started by: priya_9patil
1 Replies