Hello friends,
Im trying to grep out sentences. The sentences are previous to an academic citations in a pdf. The goal is to get summaries of citable work.
Her is what I tried reading the MAN page.
TweetGrep is one of the most important tools for a shell user. When it comes to retrieving required data from a bulk of text, grep is your best bet. Its very flexible, powerful and as I came to know today, has an interesting story too.
It all started a long time ago.
Hi ,
I have the below array
Code:
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
Code:
my @action = grep { $_ =~ s/delivered to governor on (.*)|ram/$2/ } @actionText;
prin
Dear All,
Code:
perl -e 'if($ARGV[0] =~ /\A^[0-9]{10}\z/){print "Valid string\n"}else{print "Invalid string\n"}' '1234567899'
Valid string
perl -e 'if($ARGV[0] =~ /\A^[0-9]{8}\z/){print "Valid string\n"}else{print "Invalid string\n"}' '12345678'
Valid string
individually both works, anyway to combine both together?
Dear All,
Code:
my $tmp="*3f4#_#33#"
if ($tmp =~ tr/*// > 1 || $tmp =~ tr/#// > 2) {
print "yes";
}
any possible to combine both regular expression into one?
Thanks
Hi,
I'm on a Linux machine with a bash shell.
Within AWK, how do you display a field of NR?
Hi All,
I'm stuck with this issue when I try to display the searched string into a compressed file.
More exactly when I run this script
Code:
for f1 in $(find dir1 -type f -print); do gunzip -c $f1 | grep -n "gio" | awk -F":" '{print $1-1 "," $1 "p"}' | xargs -i sed -n {} $f1 ; done
returns
Code:
T Š A1
T £ A
΀y£`Ã
b
Dear All,
Code:
#!/usr/bin/perl
use strict;
use warnings;
my $tmp = $ARGV[0];
if ($tmp =~ s/[\ \$]//g > 0) {
print "yes\n"
} else {
print "no\n";
}
Output is:
Code:
./master.pl " 333"
yes
./master.pl "$333"
no
why cannot detect the $ sign? please advise.
Thanks