10 More Discussions You Might Find Interesting
1. Programming
Hello and Good day, I am currently studying C and I just finished learning about variables mainly those of integer type.
I am wondering if the list below are all there is to integer variables and there are still more that i have to learn.
Here are the list:
Char
Short
int
long
long long... (3 Replies)
Discussion started by: split_func0
3 Replies
2. Shell Programming and Scripting
hi,
how to I do this?
i="4.000"
if ; then
echo "smaller"
fi
how do I convert the "4.000" to 4?
Thanks! (4 Replies)
Discussion started by: h0ujun
4 Replies
3. Shell Programming and Scripting
Hi fellows!!
i'm doing something which is not working out for me properly which i don't understand why
nowdate=`date +%s`
echo $nowdate
now the problem how to convert a date which is stored in a variable
mydate="22/Oct/2011"
mydate=`date -d '$mydate' +%s`
it gives error... (11 Replies)
Discussion started by: me_newbie
11 Replies
4. Solaris
hello,
i am writing a script that takes the UID from the PASSWD and then i want
to increse the Number by one. for the Next user.
i cannot get this to work that a variable is as interger
example:
set i = 0
set $i = $+1
it's in tcsh if it's mather (10 Replies)
Discussion started by: shatztal
10 Replies
5. Shell Programming and Scripting
Hi folks,
I have a value like A12,i could able to change this into integer using typeset as below
typeset -i A12
But, I need your advice to change the values like 1A2 or 12A into integer.
Thanks in advance.
Thanks,
Sathish (3 Replies)
Discussion started by: bsathishmca
3 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
is there an easy way to convert integer to string in bash?
I have numbers like 1, 2, ..., 112, ...
and I would like to get
001 002 003 004 ...
Thank you,
Sarah (4 Replies)
Discussion started by: f_o_555
4 Replies
7. Shell Programming and Scripting
i have created a script that will reverse any given ineter.
#!/bin/ksh
echo "Enter the number"
read n
if
then
a=`expr $n / 10`
b=`expr $n % 10`
c=`expr $b \* 10 + $a`
fi
echo $c
---------------------------------------------------------------------
the problem with this script... (4 Replies)
Discussion started by: ali560045
4 Replies
8. Shell Programming and Scripting
Hi ,
I have code like below in my ksh script, but getting an error as SP2-0253: data item 1 ("SAMPLE_ID") will not fit on line , pls help me. thanks.
if (( CHECKS == 0 )) || (( CHECKS == 1 ))
then
V_SAMPLE_ID=$( $ORACLE_HOME/bin/sqlplus -S / <<EOF
whenever sqlerror exit 1... (5 Replies)
Discussion started by: bennichan
5 Replies
9. Shell Programming and Scripting
Hi,
I did a df|awk| command and it returns a percentage "94%",
how could I only get the integer part
"94" out of it, so I can compare it to another number,
I knwo that I have to pipe it to sth, but "grep " did not work, it still give me number WITH the percentage, does someone know what... (3 Replies)
Discussion started by: ericaworld
3 Replies
10. UNIX for Advanced & Expert Users
i have two rules in my pf.conf file, "pass in all" and "pass out all"
i was having issues with getting pf working to begin with, so i went with
starting from nothing and working on up.
i have an ultrasparc ultra1 200e, with an added 4-port fast ethernet sbus
card, running "3.4 GENERIC#85... (4 Replies)
Discussion started by: xyyz
4 Replies