10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Friends,
Good morning.
Appended a particular string after occurrence of particular string in a file.
my file abc.sql as below
create or replace function f1(p_cust_no IN VARCHAR)
RETURN number IS
DECLARE
v_country country.customer_tbl%TYPE;
begin
begin
select... (4 Replies)
Discussion started by: ram0106
4 Replies
2. Shell Programming and Scripting
####Solved####
Hello,
My aim is to replace searched string with incremented value under ubuntu 16.04.
Example:
aasasasas 9030 31wwo weopwoep
weerasas 9030 ew31wo ieopwoep
bbqqqsas 9030 ew3swo ieeopwoep
ccsaqpas 9030 ewiro o2opwoep
Expected:
aasasasas 9030 31wwo weopwoep
weerasas 9031... (2 Replies)
Discussion started by: baris35
2 Replies
3. Shell Programming and Scripting
I apologize if it was asked before but I couldn't find something related.
I want to replace 2 strings in a file
e.g
pwddb=Lar1wod (need to replace string after =)
pwdapp=Wde2xe (need to replace string after =)
AND in same file want to find last occurrence of a string (SR2-134561),... (2 Replies)
Discussion started by: J_ang
2 Replies
4. Shell Programming and Scripting
File 1
aaa
bbb
ccc
File 2
aaa
xxx
zzz
bbb
File 3
aaa
bbb
xxx
Output: (4 Replies)
Discussion started by: Misa-Misa
4 Replies
5. Shell Programming and Scripting
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Discussion started by: spfc_dmt
12 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have a string like this 0:1:2:0:2:2:4:0:0:0:-200:500......
what i want is to break down how many different characters are there and their count. For example for above string it should display
0 - 5 times
1 - 1 times
2 - 3 times
4 - 1 times
.
.
.
I am stuck in writing... (8 Replies)
Discussion started by: exit86
8 Replies
7. Shell Programming and Scripting
Hello Folks..
I need your help ..
here the example of my problem..i know its easy..i don't all the commands in unix to do this especiallly sed...here my string..
dwc2_dfg_ajja_dfhhj_vw_dec2_dfgh_dwq
desired output is..
dwc2_dfg_ajja_dfhhj
it's a simple task with tail... (5 Replies)
Discussion started by: victor369
5 Replies
8. Shell Programming and Scripting
Hi all,
I have a lot of files with extension ".o" and I would like to extract the 10th line after (last) occurrence of a given string in each of the files.
I tried:
$ grep "string_to_look_for" *.o -A 10 | tail -1
but it gives the occurrence in the last file with extension .o
... (1 Reply)
Discussion started by: f_o_555
1 Replies
9. Shell Programming and Scripting
Hi,
filenames:
contains name of list of files to search in.
placelist
contains the names of places to be searched in all files in "filenames"
for i in $(<filenames)
do
egrep -f placelist $i
if ]
then
echo $i
fi
done >> outputfile
Output i am getting: (0 Replies)
Discussion started by: pinnacle
0 Replies
10. Shell Programming and Scripting
Hi,
My requirement is that I should search for a particular string and display the string only once if there is more occurrence of the same string in a file.
e.g In the given below log file,the string AMQ5037 comes twice.I want to search for this string and display it only once.grep will... (5 Replies)
Discussion started by: charudpss
5 Replies