10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which contains timestamp and date in the second column. If the line contains one of the word then it need to be replace like below. Any help is appreciated.
File:
a smallint
b timestamp
c date
d varchar
O/P:
a smallint
... (1 Reply)
Discussion started by: JoshvaPeter
1 Replies
2. UNIX for Advanced & Expert Users
Hi,
I want to search for a specific word in file and replace whole line with new text.
e.g.
1) I have file with below lines
APP=ABCD 12/12/2012
DB=DDB 01/01/2013
I need perl command which will check for APP=$VAL and replace whole line with APP=$NEWVAL $NEWDT
Simlarly need a... (2 Replies)
Discussion started by: mgpatil31
2 Replies
3. Shell Programming and Scripting
Hi,
I want to replace a word in a file which occurs after a particular word.
For example :
$cat file.txt
CASE
WHEN
AND c1 = 'I'
AND c2= '2'
THEN 1
WHEN
AND c1= 'I'
AND c2= '0'
THEN 2
So in this example i want to replace... (4 Replies)
Discussion started by: ashwin3086
4 Replies
4. Shell Programming and Scripting
Hi,
this belongs a little to my other post but only at the starting point.
With
find -name "*.htm*" i got a list like this:
./1999/01/file1.html
./1999/01/file2.html
./1999/02/file1.html
./2000/04/file1.html
./2000/04/file2.html
./2000/04/file3.html
./2000/file1.html... (2 Replies)
Discussion started by: Tonda
2 Replies
5. Shell Programming and Scripting
file.txt contains
abc :-X 1234 :-X fjhfkf :-X ffwerw :-X fdfgetw :-X hwfhe89 :-X
in the this file there are 6 occurance of -X
i want to replace only first 3 occurances of '-X' with 'XY'
and write back to same file. (4 Replies)
Discussion started by: nawazkhan77
4 Replies
6. UNIX for Dummies Questions & Answers
Guys,
I need to replace a portion of the lines in the file depending on the word
in my file i have this content
use DBNAME
go
print "use DBNAME"
i want to replace the variable DBNAME with something else. But the catch is this line is not always "use DBNAME". Sometimes it can be like "use... (3 Replies)
Discussion started by: sasiharitha
3 Replies
7. Shell Programming and Scripting
there are 300 files in a directory , some of these files has a word "error" , I word to change this word to "message" , can advise what can i do ? thx. (5 Replies)
Discussion started by: ust
5 Replies
8. Shell Programming and Scripting
Hi,
I have a Template file 'TL.body' which says as follows:
"There are no <FILENAME> files on the server. "
The missing file names are identified and stored in a variable.
For Eg: MISSFILE="abc.txt def.txt xyz.txt"
I want the values of MISSFILE variable to be replaced against... (2 Replies)
Discussion started by: brap45
2 Replies
9. UNIX for Dummies Questions & Answers
I ran a search for "Unix Dos" in the search field box and checked a few pages' results but did not find what I was looking for. I am trying to find out if there are choices of applications that would enable using Unix commands inside a Windows environment, particularly the DOS Prompt. The only... (2 Replies)
Discussion started by: HLee1981
2 Replies
10. UNIX for Dummies Questions & Answers
cd...
dir...
rem ...
type...
del...
copy...
mkdir...
rmdir...
attrib...
And how can I get this information?
My email address is ***removed***
By way the 001 are numbers. (3 Replies)
Discussion started by: jaquar85
3 Replies