10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I know how to replace a string with another in a file.
But, i wish to replace the below string pattern
EncryptedPassword="{gafgfa}]\asffafsf312a" i.e EncryptedPassword="<any random string>"
To
EncryptedPassword=""
i.e remove the random password to a empty string.
Can you... (3 Replies)
Discussion started by: mohtashims
3 Replies
2. UNIX for Dummies Questions & Answers
I am not an expert with linux, but following various posts on this forum, I have been trying to write a script to match pattern of charters occurring together in a file.
My file has approximately 200 million characters (upper and lower case), with about 50 characters per line. I have merged all... (5 Replies)
Discussion started by: biowizz
5 Replies
3. Shell Programming and Scripting
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
11 Replies
4. Shell Programming and Scripting
Hi All,
I have the following output file created as a result of one script called pattern_daily.log
$ cat pattern_daily.log
Approved|2|Wed, Oct 24, 2012 11:21:09 AM
Declined|1|Wed, Oct 24, 2012 11:21:15 AM
Approved|2|Wed, Oct 24, 2012 11:24:08 AM
Declined|1|Wed, Oct 24, 2012 11:24:18 AM... (4 Replies)
Discussion started by: Gem_In_I
4 Replies
5. Shell Programming and Scripting
Fairly straightforward, but I'm having an awful time getting what I thought was a simple regex to work. I'll give the command I was playing with, and I'm aware why this one doesn't work (the 1,3 is off the A-Z, not the whole expression), I just don't know what the fix is:
Actual Output(s):
$... (5 Replies)
Discussion started by: Vryali
5 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a string looks like the following:
USERS 32767.9844 UNDOTBS1 32767.9844 SYSAUX 32767.9844 SYSTEM 32767.9844 EMS 8192 EMS 8192 EMS_INDEXES 4096 EMS_INDEXES 4096 8 rows selected.
How do I extract a sub-string to get the expected output as following:
EMS 8192
EMS_INDEXES 4096
... (3 Replies)
Discussion started by: NetBear
3 Replies
7. Shell Programming and Scripting
I have a file a file having entries are like
@ram@sham@sita
@krishan@kumar
@deep@kumar@hello@sham
in this file all line are having different no of pattern-@.
need to fetch the substring after the last pattern.
like
sita
kumar
sham
thanks in advance (3 Replies)
Discussion started by: saluja.deepak
3 Replies
8. Shell Programming and Scripting
Hi,
file -> temp.txt
cat temp.txt
/home/pradeep/123/a_asp.html
/home/pradeep/123/a_asp1.html
/home/pradeep/435/a_asp2.html
/home/pradeep/arun/abc/a_dfr.html
/home/pradeep/arun/123/a_kir.html
/home/pradeep/123/arun/a_dir.html
....
....
..
i need to get a_*.html(bolded strings... (4 Replies)
Discussion started by: pradebban
4 Replies
9. Shell Programming and Scripting
Hi all,
I'm looking for some help. I have a file (very long) that is organized like below:
>Cluster 0
0 283nt, >01_FRYJ6ZM12HMXZS... at +/99%
1 279nt, >01_FRYJ6ZM12HN12A... at +/99%
2 281nt, >01_FRYJ6ZM12HM4TS... at +/99%
3 283nt, >01_FRYJ6ZM12HM946... at +/99%
4 279nt,... (4 Replies)
Discussion started by: d.chauliac
4 Replies
10. Shell Programming and Scripting
Hi,
I have file 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433... (4 Replies)
Discussion started by: imas
4 Replies