Hi All,
I am new to shell script.
I wrote a very small script that takes only digits as input-
but there is some problem in that.can you help me in debugging that.
#!/bin/ksh
echo "Digits as input"
read number
digit='eval '
if ]
then
echo "Entered number is a digit"
else
echo... (2 Replies)
I want to check the argument in KSH. If the user type in the prompt 'find 3' it will format 3 to 003 to match the data in the text file. Same as with 10 to 010. Always begins with 0.
eg.
>find 3
Output:
003
>find 30
Output:
030 (7 Replies)
hi group,
How can I count total number of 5's which are continuous in the end. i.e. in the below string, the o/p should be 4
I just know to calculate total number of 5's
$ echo "95952325555" | awk -F "5" '{print NF-1}'
6 (3 Replies)
Hi Folks
Probably an easy one here but how do I get a sequence to get used as mentioned. For example in the following I want to automatically create files that have a 2 digit number at the end of their names:
m@pyhead:~$ for x in $(seq 00 10); do touch file_$x; done
m@pyhead:~$ ls file*... (2 Replies)
Hello all! I've looked all over the internet and this site and have come up a loss with an easy way to make a bash script to do what I want to do. I have a file with a naming convention as follows:
2012-01-18 string of words here 123.jpg
2012-01-18 string of words here 1234.jpg
2012-01-18... (2 Replies)
Hi,
How I can replace last 8 ZEROS with 22991231?
19523479811841494432A2013052700000000
19523479811730333980A2013052700000000
19523479811417044397A2013052700000000
19523479811205895810C2013010120130131
A9523479811205895810A2013020120130228
19523479811205895810I2013030120130331... (9 Replies)
Is there any program that can create 6 digit numbers with:
(DIGIT_1)+(DIGIT_2)+(DIGIT_3)+(DIGIT_4)+(DIGIT_5)+(DIGIT_6)=10
Any perl or C also can. Anyone can help me? Thank you (6 Replies)
e.g.
File name: File.txt
cat File.txt
Result:
#INBOUND_QUEUE=FAQ1
INBOUND_QUEUE=FAQ2
I want to get the value for one which is not commented out.
Thanks, (3 Replies)
Hello everybody
I'm a little beginer for shell script as I started last night...
I have this script
cat fichier.txt | while read l ; do
#echo $l
echo $x
x=$(( $x + 1 ))
done
it's return
1
2
3
4 (4 Replies)
Hi All ,
I am having an input file as stated below
5728 U_TOP_LOGIC/U_CM0P/core/u_cortexm0plus/u_top/u_sys/u_core/r03_q_reg_20_/Q 011
611 U_TOP_LOGIC/U_CM0P/core/u_cortexm0plus/u_top/u_sys/u_core/r04_q_reg_20_/Q 011
3486... (4 Replies)
Discussion started by: kshitij
4 Replies
LEARN ABOUT LINUX
fixed
fixed(3erl) Erlang Module Definition fixed(3erl)NAME
fixed - the corba fixed type
DESCRIPTION
This module contains functions that gives an interface to the CORBA fixed type.
The type Fixed used below is defined as:
-record(fixed, {digits, scale, value}).
where digits is the total amount of digits it consists of and scale is the number of fractional digits. The value field contains the actual
Fixed value represented as an integer. The limitations of each field are:
* Digits - integer(), -1 > Digits < 32
* Scale - integer(), -1 > Scale =< Digits
* Value - integer(), range (31 digits): +/-9999999999999999999999999999999
Since the Value part is represented by an integer, it is vital that the Digits and Scale values are correct. This also means that trailing
zeros cannot be left out in some cases:
* fixed<5,3> eq. 03.140d eq. 3140
* fixed<3,2> eq. 3.14d eq. 314
Leading zeros can be left out.
For your convenience, this module exports functions which handle unary ( - ) and binary ( +-*/ ) operations legal for the Fixed type. Since
a unary + have no effect, this module do not export such a function. Any of the binary operations may cause an overflow (i.e. more than 31
significant digits; leading and trailing zeros are not considered significant). If this is the case, the Digit and Scale values are
adjusted and the Value truncated (no rounding performed). This behavior is compliant with the OMG CORBA specification. Each binary opera-
tion have the following upper bounds:
* Fixed1 + Fixed2 - fixed<max(d1-s1,d2-s2) + max(s1,s2) + 1, max(s1,s2)>
* Fixed1 - Fixed2 - fixed<max(d1-s1,d2-s2) + max(s1,s2) + 1, max(s1,s2)>
* Fixed1 * Fixed2 - fixed<d1+d2, s1+s2>
* Fixed1 / Fixed2 - fixed<(d1-s1+s2) + Sinf ,Sinf >
A quotient may have an arbitrary number of decimal places, which is denoted by a scale of Sinf.
EXPORTS
create(Digits, Scale, Value) -> Result
Types Result = Fixed Type | {'EXCEPTION', #'BAD_PARAM'{}}
This function creates a new instance of a Fixed Type . If the limitations is not fulfilled (e.g. overflow) an exception is raised.
get_typecode(Fixed) -> Result
Types Result = TypeCode | {'EXCEPTION', #'BAD_PARAM'{}}
Returns the TypeCode which represents the supplied Fixed type. If the parameter is not of the correct type, an exception is raised.
add(Fixed1, Fixed2) -> Result
Types Result = Fixed1 + Fixed2 | {'EXCEPTION', #'BAD_PARAM'{}}
Performs a Fixed type addition. If the parameters are not of the correct type, an exception is raised.
subtract(Fixed1, Fixed2) -> Result
Types Result = Fixed1 - Fixed2 | {'EXCEPTION', #'BAD_PARAM'{}}
Performs a Fixed type subtraction. If the parameters are not of the correct type, an exception is raised.
multiply(Fixed1, Fixed2) -> Result
Types Result = Fixed1 * Fixed2 | {'EXCEPTION', #'BAD_PARAM'{}}
Performs a Fixed type multiplication. If the parameters are not of the correct type, an exception is raised.
divide(Fixed1, Fixed2) -> Result
Types Result = Fixed1 / Fixed2 | {'EXCEPTION', #'BAD_PARAM'{}}
Performs a Fixed type division. If the parameters are not of the correct type, an exception is raised.
unary_minus(Fixed) -> Result
Types Result = -Fixed | {'EXCEPTION', #'BAD_PARAM'{}}
Negates the supplied Fixed type. If the parameter is not of the correct type, an exception is raised.
Ericsson AB orber 3.6.20 fixed(3erl)