Hi,
Please find the attached scriplet and suggest me to fix the bug in this.
-----------------------------------
noofdirs=`ls *.tar | wc -l`
if ; then
let i=1
while ( $i <= $noofdirs ) ;
do
echo $i
mkdir $i
file1=`ls *.tar | head -1`
mv $file1 $i
i =... (2 Replies)
a=10
b=10.6
c=$(echo "$a - $b" | bc)
if ]
echo "success"
else
echo "failure"
fi
while executing the above sample code, am getting the below error:
seems unix is comparing .6 with 0 instead of 0.6 with 0.
can anyone help me in solving this ?
regards, (7 Replies)
Anybody please help me...
Design an algorithm that accepts an input a decimal number and converts it into BCD (Binary Coded Decimal) representation. Also, draw its Flow Chart.
This is a unix qn...
plz post algorithm for that :confused: (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Design an algorithm that accepts an input a decimal number and converts it into BCD (Binary... (2 Replies)
Hi All,
can you pls throw some light for below logic
-> Check the perl version
-> if the version is greater than or equal to 5.8
-> proceed to next step
-> else fail
Regards
Kamal (2 Replies)
Hi,
I want to convert two hexadecimal numbers to decimal using unix command line.
1cce446295197a9d6352f9f223a9b698
fc8f99ac06e88c4faf669cf366f60d
I tried using
`echo "ibase=16; $no |bc`
printf '%x\n' "1cce446295197a9d6352f9f223a9b698"
but it doesn't work for such big number it... (4 Replies)
Hi ,
seq can be 0...128
int windex = seq / 8;
int bindex = seq % 8;
unsigned char bitvalue = '\x01' << (7-bindex) ;
bpv.bitmapvalue = bitvalue;
This is the part of a program to convert decimal to bitmap value of hexadecimal.
I want this to change to convert only to... (1 Reply)
Hi Experts,
I have requirement to pad a decimal number that should have fixed length as 10.
if number is 234.234 > 234.234000
if number is 12.4 > 12.4000000
if number is 3456.5678 > 3456.56780
from above example we can see that overall length is 10 and padding is being done right sided of... (2 Replies)
I used the below script to Sum up a field in a file based on some unique values. But the problem is when it is summing up the units, it is truncating to 2 decimals and not 6 decimals as in the input file (Input file has the units with up to 6 Decimals – Sample data below, when the units in the 2... (4 Replies)
Discussion started by: brlsubbu
4 Replies
LEARN ABOUT DEBIAN
stag-diff
STAG-DIFF(1p) User Contributed Perl Documentation STAG-DIFF(1p)NAME
stag-diff - finds the difference between two stag files
SYNOPSIS
stag-diff -ignore foo-id -ignore bar-id file1.xml file2.xml
DESCRIPTION
Compares two data trees and reports whether they match. If they do not match, the mismatch is reported.
ARGUMENTS
-help|h
shows this document
-ignore|i ELEMENT
these nodes are ignored for the purposes of comparison. Note that attributes are treated as elements, prefixed by the containing
element id. For example, if you have
<foo ID="wibble">
And you wish to ignore the ID attribute, then you would use the switch
-ignore foo-ID
You can specify multiple elements to ignore like this
-i foo -i bar -i baz
You can also specify paths
-i foo/bar/bar-id
-parser|p FORMAT
which parser to use. The default is XML. This can also be autodetected by the file suffix. Other alternatives are sxpr and itext. See
Data::Stag for details.
-report|r ELEMENT
report mismatches as they occur on each element of type ELEMENT
multiple elements can be specified
-verbose|v
used in conjunction with the -report switch
shows the tree of the mismatching element
OUTPUT
If a mismatch is reported, a report is generated displaying the subpart of the tree that could not be matched. This will look like this:
REASON: no_matching_node: annotation
no_matching_node: feature_set
no_matching_node: feature_span
no_matching_node: evidence
no_matching_node: evidence-id
data_mismatch(:15077290 ne :15077291): evidence-id AND evidence-id
Due to the nature of tree matching, it can be difficult to specify exactly how trees do not match. To investigate this, you may need to use
the -r and -v options. For the above output, I would recommend using
stag-diff -r feature_span -v
ALGORITHM
Both trees are recursively traversed... see the actual code for how this works
The order of elements is not important; eg
<foo>
<bar>
<baz>1</baz>
</bar>
<bar>
<baz>2</baz>
</bar>
</foo>
matches
<foo>
<bar>
<baz>2</baz>
</bar>
<bar>
<baz>1</baz>
</bar>
</foo>
The recursive nature of this algorithm means that certain tree comparisons will explode wrt time and memory. I think this will only happen
with very deep trees where nodes high up in the tree can only be differentiated by nodes low down in the tree.
Both trees are loaded into memory to begin with, so it may thrash with very large documents
AUTHOR
Chris Mungall cjm at fruitfly dot org
SEE ALSO
Data::Stag
perl v5.10.0 2008-12-23 STAG-DIFF(1p)