Search Results

Search: Posts Made By: sbhuvana20
1,408
Posted By sbhuvana20
Find records with matching patterns
Hi,

I need to find records with a search string from a file. Search strings are provided in a file.

For eg. search_String.txt file is like below
chicago
mexico
newark
sanhose

and the...
3,705
Posted By sbhuvana20
yeah .. the lines are sorted. The whole line is...
yeah .. the lines are sorted.
The whole line is being compared
3,705
Posted By sbhuvana20
To get the lines that are not present in file
Hi

I have got two files

File1:
Row1
Row2
Row3
Row4

File2:
Row3
Row4

Now my requirement is search each and every line of file1 in file2 and if the record do not exist in file2...
18,099
Posted By sbhuvana20
Hi .... Thanks, this command worked... ...
Hi ....
Thanks,

this command worked...
perl -i.tmp -pe 's/abc\@def.com/xyz\@jki.com/i' test_file

but can we not passs the search string and reaplce string as variables to this command??...
18,099
Posted By sbhuvana20
But my search string might have a lengthy word...
But my search string might have a lengthy word too. It might be cumbersome to use all possibilities in the command.

Is there any other way to do this ?

---------- Post updated at 04:58 AM...
18,099
Posted By sbhuvana20
Using sed for case insensitive search
Hi,

I have a file named "test_file" that has the below content. It has words in upper/lower cases
PRODOPS
prodOPS
ProdOps
PRODops
escalate
Shell

My requirement is to replace all the...
5,774
Posted By sbhuvana20
Thanks, this worked cp -p test.ksh...
Thanks, this worked
cp -p test.ksh test.ksh_temp
sed 's/prodops.monitor@corp.earthlink.net//' test.ksh > test.ksh_temp
5,774
Posted By sbhuvana20
Thanks for the reply. But that does not work. I...
Thanks for the reply. But that does not work. I tried it and it gave the below error.


chmod: illegal option -- reference=test.ksh
usage: chmod [-fR] <absolute-mode> file ...
chmod...
5,774
Posted By sbhuvana20
Using sed to replace one string with other
hi,

I am using sed command to replace a string "prodops" with "psops" using the below command

sed 's/prodops.monitor@corp.earthlink.net//' test.ksh > test.ksh_temp

But when I do this...
3,084
Posted By sbhuvana20
Thanks Anurag, Can I pass pattern also as a...
Thanks Anurag,

Can I pass pattern also as a parameter. In my case "abc" is pattern that has to be searched
3,084
Posted By sbhuvana20
Hi Frank, Thanks. It worked. Could you...
Hi Frank,

Thanks. It worked. Could you please tell me if I can pass the pattern, name of file1 and file2 as parameters to AWK.



Thanks
3,084
Posted By sbhuvana20
NAWK to remove lines that matches a specific pattern
Hi,

I have requirement that I need to split my input file into two files based on a search pattern "abc"

For eg. my input file has below content

abc
defgh
zyx

I need file 1 with...
3,360
Posted By sbhuvana20
Thanks a lot !!!! this worked for me ...
Thanks a lot !!!! this worked for me

line_length=4
nawk '{\
if (length> len)
print > "test_bad"
else
print > "test_good"
}' len=$line_length test.txt
3,360
Posted By sbhuvana20
Help to use NAWK command
Hi,

I am using NAWK command to scan a file (test.txt) and to create new files based on the length of lines in the file test.txt.

My requirement is I need to create test_good with records...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 08:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy