9 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. Solaris
Hi
Using the below logic to check whether the value is integer or not and converting the value to decimal if not.
int_chck = sprintf(substr($i, 1, 2))
o_cnt = 'if ; then echo $int_chck; else echo $((0x$int_chck)); fi'
Thanks,
Dines (4 Replies)
Discussion started by: dineshnak
4 Replies
3. Shell Programming and Scripting
I am on HP-UX using ksh in the script.
MaxSal=`sqlplus -silent /nolog <<EOF
connect / as sysdba
whenever sqlerror exit sql.sqlcode
set pagesize 0 feedback off verify off heading off echo off
select max(sal) from emp1;
select max(sal) from emp2;
select max(sal) from emp3;
exit;
EOF`... (3 Replies)
Discussion started by: bang_dba
3 Replies
4. 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
5. 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
6. 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
7. 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
8. 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
9. IP Networking
i am writing a client and server program
client program
main()
{
int sockfd,n;
char str;
struct sockaddr_in sock;
if ((sockfd=socket(AF_INET,SOCK_STREAM,0))<0)
{
perror("SOCKET ERROR");
}
bzero(&sock,sizeof(sock));
sock.sin_family=AF_INET; (1 Reply)
Discussion started by: ramneek
1 Replies