10-28-2010
Yes, after the replacement, you can take away the lower 6 bits for your base64 to binary conversion.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all
i wrote a shell script which uses perl script my code is :
>cat filename | while read i
>do
>perl -e 'require "/home/scripts/abc.pl" ; abc("$i")'
>done
perl script used will simply check syntax of Cobol programs but it didn't work for me so i asked my colleague he suggested... (1 Reply)
Discussion started by: zedex
1 Replies
2. UNIX for Advanced & Expert Users
hi all
i was going through some perl code i came across this line and i am not getting what is exactly going on ..
$$this{localtion} = GetName->GetVarName("EXE_DIR") ;
what is the red part doing in above code (2 Replies)
Discussion started by: zedex
2 Replies
3. Shell Programming and Scripting
This is taken from perlop. I can't understand what's going on, please can someone explain this for me?
$hexdigit = (0 .. 9, 'a' .. 'f');
to get a hexadecimal digit (2 Replies)
Discussion started by: ksheller
2 Replies
4. Programming
#define abc '\xE8' (7 Replies)
Discussion started by: kamlesh33
7 Replies
5. UNIX for Advanced & Expert Users
I have seen something like this in a perl code:
$_ =~ s/__FD_PRN_/\\(/g
What does this "__FD_PRN_" means. I have searched google but was not able to find any info regarding this. Appreciate if some one can refer to a link for these characters. From comments/code it used to substitue "(" with... (3 Replies)
Discussion started by: sarbjit
3 Replies
6. UNIX for Dummies Questions & Answers
Could you please tell the meaning of Below mentioned perl script lines:
format OWNER_TOTAL =
@< Owner Code @<<<<<<total: @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @######
#.##
$prev_cust_type, $prev_owner_code,... (2 Replies)
Discussion started by: vinothrajan55
2 Replies
7. Shell Programming and Scripting
I am using this line of perl code to change the file format and remove ^M at the end of each line in files:
perl -i -pe's/\r$//;' <name of file here>
Can you explain to me what this code does, and translate it into bash/awk/sed? (2 Replies)
Discussion started by: locoroco
2 Replies
8. UNIX for Beginners Questions & Answers
@sorted = sort { $a <=> $b } @unsorted;
I am having hard time understanding how this works? I know the output but interested to know the working.
Thanks in advance. (2 Replies)
Discussion started by: Tanu
2 Replies
9. UNIX for Beginners Questions & Answers
sub uniq {
my %h;
return grep { !$h{$_}++ } @_
}
The above code is to remove duplicates from array.
I am having hard time understanding below things (basically around highlighted code in bold)-
when was the value inserted in hash?
and are we only adding a key in Hash not... (1 Reply)
Discussion started by: Tanu
1 Replies
LEARN ABOUT DEBIAN
sdf2fps
SDF2FPS(1) User Commands SDF2FPS(1)
NAME
sdf2fps - sdf2fps
DESCRIPTION
usage: sdf2fps [-h] [--id-tag TAG] [--fp-tag TAG] [--num-bits INT]
[--errors {strict,report,ignore}] [-o FILENAME] [--software TEXT] [--type TEXT] [--decompress METHOD] [--binary] [--binary-msb]
[--hex] [--hex-lsb] [--hex-msb] [--base64] [--cactvs] [--decoder DECODER] [--pubchem] [filenames [filenames ...]]
Extract a fingerprint tag from an SD file and generate FPS fingerprints
positional arguments:
filenames
input SD files (default is stdin)
optional arguments:
-h, --help
show this help message and exit
--id-tag TAG
get the record id from TAG instead of the first line of the record
--fp-tag TAG
get the fingerprint from tag TAG (required)
--num-bits INT
use the first INT bits of the input. Use only when the last 1-7 bits of the last byte are not part of the fingerprint. Unexpected
errors will occur if these bits are not all zero.
--errors {strict,report,ignore}
how should structure parse errors be handled? (default=strict)
-o FILENAME, --output FILENAME
save the fingerprints to FILENAME (default=stdout)
--software TEXT
use TEXT as the software description
--type TEXT
use TEXT as the fingerprint type description
--decompress METHOD
use METHOD to decompress the input (default='auto', 'none', 'gzip', 'bzip2')
Fingerprint decoding options:
--binary
Encoded with the characters '0' and '1'. Bit #0 comes first. Example: 00100000 encodes the value 4
--binary-msb
Encoded with the characters '0' and '1'. Bit #0 comes last. Example: 00000100 encodes the value 4
--hex Hex encoded. Bit #0 is the first bit (1<<0) of the first byte. Example: 01f2 encodes the value x01xf2 = 498
--hex-lsb
Hex encoded. Bit #0 is the eigth bit (1<<7) of the first byte. Example: 804f encodes the value x01xf2 = 498
--hex-msb
Hex encoded. Bit #0 is the first bit (1<<0) of the last byte. Example: f201 encodes the value x01xf2 = 498
--base64
Base-64 encoded. Bit #0 is first bit (1<<0) of first byte. Example: AfI= encodes value x01xf2 = 498
--cactvs
CACTVS encoding, based on base64 and includes a version and bit length
--decoder DECODER
import and use the DECODER function to decode the fingerprint
shortcuts:
--pubchem
decode CACTVS substructure keys used in PubChem. Same as --software=CACTVS/unknown --type 'CACTVSE_SCREEN/1.0 extended=2'
--fptag=PUBCHEM_CACTVS_SUBSKEYS --cactvs
sdf2fps 1.0 June 2012 SDF2FPS(1)