11-03-2010
thanks for the quick reply... did exactly what I needed :-)
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have 70 files and want to replace string1 with string2. How can i do that?.
Thanks (4 Replies)
Discussion started by: shashikandi
4 Replies
2. Shell Programming and Scripting
Hi all,
can any one suggest me the script to grep multiple strings from ps -ef
pls correct the below script . its not working/
i want to print OK if all the below process are running in my solaris system. else i want to print NOT OK.
bash-3.00$ ps -ef | grep blu
lscpusr 48 42 ... (11 Replies)
Discussion started by: steve2216
11 Replies
3. Shell Programming and Scripting
Hi,
I'm not a expert in shell programming, so i've come here to take help from u gurus.
I'm trying to tailor a csv file that i got to make it work for the LOAD FROM command.
I've a datatable csv of the below format -
--in file format
xx,xx,xx ,xx , , , , ,,xx,
xxxx,, ,, xxx,... (11 Replies)
Discussion started by: dvah
11 Replies
4. Shell Programming and Scripting
How do I use awk to find the records in a file that contains two specific strings?
I have tried piping and using awk two times, but I don't know how to do it in one action. (2 Replies)
Discussion started by: locoroco
2 Replies
5. Shell Programming and Scripting
I have two files, a keepout.txt and a database.csv. They're unsorted, but could be sorted.
keepout:
user1
buser3
anuser19
notheruser27
database:
user1,2343,"information about",field,blah,34
user2,4231,"mo info",etc,stuff,43
notheruser27,4344,"hiya",thing,more thing,423... (4 Replies)
Discussion started by: esoffron
4 Replies
6. Shell Programming and Scripting
I have been searching and trying to come up with an awk that will perform the following on a
converted text file (original is a pdf).
1. Since the first two lines are (begin with) text they are removed
2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
Discussion started by: cmccabe
3 Replies
7. UNIX for Beginners Questions & Answers
My OS is Windows 10 and I am using Cygwin.
The file 1 content is:
USE solution 2; -4.000
USE solution 3; -4.000
…
USE solution 29; -4.000
USE solution 30; -4.000
USE solution 31; -4.000
….
USE solution 89; -4.000
...
USE solution 202; -4.000
etc...
I need to replace... (8 Replies)
Discussion started by: supernono06
8 Replies
8. Shell Programming and Scripting
Hello,
My aim is to search string1 in all lines. When found, find and replace string2 by string3 if possible.
TextFile:
Here is my first line
Second line with string1 & string2
Not last line but it contains string1
Expected output:
Here is my first line
The second line with string1 &... (6 Replies)
Discussion started by: baris35
6 Replies
9. Shell Programming and Scripting
Hello,
This is a bit complicated for me.
My scenario in MyFile:
Search string1,
When string1 is found, grep the line containing string1, go back over that line in upward direction and grep the first line containing string2.
Here is an example:
MyFile
His email address... (17 Replies)
Discussion started by: baris35
17 Replies
10. UNIX for Beginners Questions & Answers
I found this in the forum that searches a file for string1, substitute all occurrences of string2 with string3.
(Title: Replace string2 by string3 where string1 is found in line)
>> sed -i '/string1/s/string2/string3/g' TextFile
How will I perform the same sed command and only substitute... (3 Replies)
Discussion started by: apalex
3 Replies