10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am having trouble re-writing this sed code
sed -nr 's/.*del(+)ins(+).*NC_0{4}(+).*g\.(+)_(+).*/\3\t\4\t\5\t\1\t\2/p' C:/Users/cmccabe/Desktop/Python27/out_position.txt > C:/Users/cmccabe/Desktop/Python27/out_parse.txt in perl Basically, what the code does is parse text from two fields... (12 Replies)
Discussion started by: cmccabe
12 Replies
2. Shell Programming and Scripting
Its really 2 questions, but both are pretty basic.
Linux Redhat
1. Need to do a search and replace on a file.
I need to append '--' (comment out the line) to specific lines based on a wildcard search.
So if I Have
GRANT SOME_ROLE_OR_USER ...
I dont care what comes after that.... (2 Replies)
Discussion started by: guessingo
2 Replies
3. Shell Programming and Scripting
I want to match the number exactly from the variable which has multiple numbers seperated by pipe symbol similar to search in egrep.below is the code which i tried
#!/usr/bin/perl
my $searchnum = $ARGV;
my $num = "148|1|0|256";
print $num;
if ($searchnum =~ /$num/)
{
print "found";
}... (2 Replies)
Discussion started by: kar_333
2 Replies
4. Shell Programming and Scripting
I have an array with characters, what I want is if there are other characters in the array which I am looking for than take action that is print BAD ARRAY. So far my code just finds characters but instead I want that it should look for other characters.
echo "A B C D F" | egrep -o "D | F"
O/P... (5 Replies)
Discussion started by: dixits
5 Replies
5. Shell Programming and Scripting
Hi guys I'm using the following script to change input file format to another format. some where I'm getting the error. Could you please let me know if you find out?
cat input.txt|egrep -v ‘^#'|\ perl -ane ‘if (@F>3){$_=~/(chr.+):(\d+)\ s()/;print $1,”\t”,$2,”\t”,($2+35),”\n”}'\ > output.bed
... (1 Reply)
Discussion started by: repinementer
1 Replies
6. Shell Programming and Scripting
Hi there
if i run this from the BASH command line, i get a good result
# FS="my-box23/account"
# zfs list -t filesystem -H | cut -f1 |egrep "^ZPpool1/$FS$"
ZP0pool1/my-box23/account
which is great, however if I try to run in a perl script populating an array with the result/s, i get... (4 Replies)
Discussion started by: rethink
4 Replies
7. Shell Programming and Scripting
Hi experts.
In one thread i have asked you how to grep the string from the below sample file-
Unfortunately the script did not gave proper output (it missed many strings). It happened may be i did gave you the proper contents of the file
That was the script-
"$ perl -00nle'print join... (13 Replies)
Discussion started by: thepurple
13 Replies
8. Shell Programming and Scripting
I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows:
$count = 0;
while ( $count < $#test )
{
`sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`;
`cat 0 >... (2 Replies)
Discussion started by: userix
2 Replies
9. UNIX for Dummies Questions & Answers
Hi I've been searching google and have not found what egrep -c means. Does anyone know where I can get a cheat sheet or what that -c means?
thanks,
Linda (2 Replies)
Discussion started by: leelm
2 Replies
10. Shell Programming and Scripting
My egrep outputs this:
$ cat html.out|sed -n '/bluetext/s/ / /gp'|egrep '{5}'
<span class="bluetext"><b> Lexington Park, MD 20653</b></span>
But my backreference \1 is empty. I dont understand why. Can someone clarify?
$ cat html.out|sed -n '/bluetext/s/ / /gp'|sed -n... (1 Reply)
Discussion started by: r0sc0
1 Replies