10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I'm looking to split the following hex string into rows of four elements.
I've tried the following but it doesn't seem to work. How can I tell sed to match based on a pair of number(s) and letter(s), and add a newline every 4 pairs?
In addition, I need to add another newline after every... (5 Replies)
Discussion started by: sand1234
5 Replies
2. Shell Programming and Scripting
cat clinvar_00-latest.vcf | perl -aF/\\t/ -lne '/CLNSRCID=(\d+)/ and print join("\t",@F,$1)' > OMIM.txt
The above code finds the text CLNSRCID=, but only outputs those records in which there is a numerical value only.
For example, the first match is CLNSRCID=103320.0001 in line 4 of the... (1 Reply)
Discussion started by: cmccabe
1 Replies
3. Shell Programming and Scripting
i have a script in which i need to skip comments, and i am able to achieve it partially...
IN text file:
{****************************
{test : test...test }
Script:
while (<$fh>)
{
push ( @data, $_);
}
if ( $data =~ m/(^{\*+$)/ ){
}
With the above match i am... (5 Replies)
Discussion started by: avskrm
5 Replies
4. Shell Programming and Scripting
Hi,
i want to convert number 5860533159 to hexadecimal. i need to use perl.
i used
$foo = 5860533159;
$hexval3 = sprintf("%#x", $foo);
i am getting value as 0xffffffff.
i need to get value as 0x15D50A3A7. when i converted using google calculator, i got the correct value, expected... (9 Replies)
Discussion started by: asak
9 Replies
5. Shell Programming and Scripting
Hi Everyone,
I am looking for neat way to grep a non-empty string that basically contains a hostname, which might be in FWDN form or without the domain, for example:
hostname.internal.domainname.net
The file I am parsing contains blan lines (^$) and also series of "-" which in other places... (2 Replies)
Discussion started by: togr
2 Replies
6. Programming
Hello all. I need help...
How can I cenvert this 42ec93df826c804ea531c56594db453d54daad4b to normal text? What convertor I have to use?
Thanks. (12 Replies)
Discussion started by: escudo
12 Replies
7. Shell Programming and Scripting
Am trying to remove urls from text strings in PERL. I have the following but it does not seem to work:
$remarks =~ s/www\.\s+\.com//gi;
In English, I want to look for www. then I want to delete the www. and everything after it until I hit a space (but not including the space).
It's not... (2 Replies)
Discussion started by: mrealty
2 Replies
8. Shell Programming and Scripting
Hi,
I'm trying to get one field out of many as follows:
A string of multiple fields separated with "/" characters:
"/ab=12/cd=34/12=ab/34=cd/ef=pick-this.one/gh=blah/ij=something/"
I want to pick up the field "ef=pick-this.one" which has no regular pattern except it starts with "ef=xxxx"... (3 Replies)
Discussion started by: Juha
3 Replies
9. UNIX for Dummies Questions & Answers
Am not able to display the corresponding character for the hex value using the format specifier into a file
Could you please help me with that
>cat other
a|\xc2\xbo
>cat write.pl
#! /opt/third-party/bin/perl
open(FILE2, "< other") || die "Unable to open file other\n";
while (... (7 Replies)
Discussion started by: matrixmadhan
7 Replies
10. Programming
HI
Hi I have a character string which contains some special characters and I need it to display as a hex string.
For example, the sample i/p string: ×¥ïA Å gïÛý and
the o/p should be : D7A5EF4100C5010067EFDBFD
Any pointers or sample code pls. (5 Replies)
Discussion started by: axes
5 Replies