10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
2. Shell Programming and Scripting
Dear Unix Forum Group Members,
Please do let me know how I can replace the double pipe with single pipe recursively on single record.
Sample Input Data:
DN set|Call prefix||| Called number address nature
0||| *789|||||||ALL number types
0||| 00||||||||ALL number types
10||... (5 Replies)
Discussion started by: srinu.kadem
5 Replies
3. Shell Programming and Scripting
Hi,
I need to find all rows in 1st col of one file in another file (first occurrence) and replace the 1st col of first file with the grep result (the entire line). For example search AA from file 1 in file 2 and replace in file 1 by entire line found.
File1
AA BB CC DD
BB AA CC DDFile2
... (2 Replies)
Discussion started by: ritakadm
2 Replies
4. Shell Programming and Scripting
Hi,
Need some help...
I want to execute sequence commands, like below
test1.sh
test2.sh
...etc
test1.sh file will generate log file, we need to search for 'complete' string on test1.sh file, once that condition success and then it should go to test2.sh file, each .sh scripts will take... (5 Replies)
Discussion started by: rkrish123
5 Replies
5. UNIX for Advanced & Expert Users
Using grep -r -H "foobar" / > result to give
all files that contain the string "foobar"
Half way , its waiting for some thing and does not end
Not Sure whats happening.
Any help is much appreciated
Thank you (2 Replies)
Discussion started by: shorn
2 Replies
6. Shell Programming and Scripting
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies
7. Shell Programming and Scripting
Hello: I have another question. Please consider the following two sample, tab-delimited files:
File_1:
Abf1 YKL112w
Abf1 YAL054c
Abf1 YGL234w
Ace2 YKL150w
Ace2 YNL328c
Cup9 YDR441c
Cup9 YDR442w
Cup9 YEL040w
...
File 2:
...
ABF1 YKL112W
ACE2 YLR131C (9 Replies)
Discussion started by: gstuart
9 Replies
8. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies
9. Shell Programming and Scripting
Hello all
Im performing find + grep operation that looks like this :
find . -name "*.dsp" | xargs grep -on Project.lib | grep -v ':0'
and I like to add to this one liner the possibility to replace the string " Project.lib" that found ( more then once in file ) with "Example.lib"
how can I do... (0 Replies)
Discussion started by: umen
0 Replies
10. Shell Programming and Scripting
In my script I read a input file and search all the files in a directory and it's sub-directories for that string using:
find . -type f -print | xargs grep $var1
This just displays all the lines the string was found on. Too much data.
What I need is to store in a file one time those... (17 Replies)
Discussion started by: John Rihn
17 Replies