10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I have the below array
my @actionText = ("delivered to governor on 21/23/3345" , "deliver jllj" , "ram 2345/43");
When i am trying to grep the contents of array and if mathced substituting with the digitis or some date format from the element like below
my @action = grep { $_ =~... (7 Replies)
Discussion started by: ragilla
7 Replies
2. Programming
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
Discussion started by: jessy83
1 Replies
3. Shell Programming and Scripting
I am completely new to perl programming. My father is helping me learn said programming language. However, I am stuck on one of the assignments he has given me, and I can't find very much help with it via google, either because I have a tiny attention span, or because I can be very very dense.
... (4 Replies)
Discussion started by: kittyluva2
4 Replies
4. Shell Programming and Scripting
Hi,
I read the book of <<unix shell programming>>. The regular expression ^\(.\)\1 matches the first character on the line and stores it in register 1. Then the expression matches whatever is stored in the register 1, as specified by the \1. The net effect of this regular expression is to match... (2 Replies)
Discussion started by: jianma
2 Replies
5. Shell Programming and Scripting
I need a perl substitution to remove only the comment in the line . That line may have '#' with in double quotes .I used the following ,
s/(^.*\".+?#.+?\".+?)(#.*)/$1/g
It works for ,
print " not a comment # not a comment " . "not a comment # not a comment" ; # It is a comment
... (3 Replies)
Discussion started by: karthigayan
3 Replies
6. Linux
Hi :)
I have 2 files
file1:
SNP_A-2208459
SNP_A-4215188
SNP_A-2012248
SNP_A-1882998
file2:
CHR SNP UNADJ BONF HOLM * * * etc.
19 SNP_A-2236481 1.742e-26 5.442e-21
13 SNP_A-4204405 8.643e-07 1.505e-06
3 SNP_A-1860908... (11 Replies)
Discussion started by: sogi
11 Replies
7. Shell Programming and Scripting
Hello All
I have file which contain sample data like below -
test.txt
----------------------------------------------
jambesh aaa india
trxxx
sdasd
mentor
asss
light
train
bbblah
---------------------------------------------
I want to write a regX which would print only those... (4 Replies)
Discussion started by: jambesh
4 Replies
8. Shell Programming and Scripting
hi everybody
I am a new user to this forum and its previous posts have been very useful. I'm searching in a file using grep for patterns like
12.13.444
55.44.443
i.e. of form
<digit><digit>.<digit><digit>.<digit><digit><digit>
Can anybody help me with this.
Thanks in advance (4 Replies)
Discussion started by: jpriyank
4 Replies
9. Shell Programming and Scripting
Hi,
I am stuck with a problem here.
Suppose i have a variable which is assigned some string containing special charatcers. for eg:
$a="abcdef^bbwk#kdbcd@";
I have to remove the special characters using Perl. The text is assigned to the variable implicitly.
How to do it? (1 Reply)
Discussion started by: agarwal
1 Replies
10. Shell Programming and Scripting
letz say that my file has 7 records with only one field. So my file has:
11111111
000000000000000
1111
aaaabbbccc
1111111222000000
aaaaaaaa
zz
All i need is:
1. when the field has a repetition of the same instance(a-z or 0-9), i would consideer it to be invalid.... (1 Reply)
Discussion started by: helengoldman
1 Replies