10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a function that is supposed to check for user processes and wait for 0 count before exiting the function. I am sure I have more than one issue in my code, but the stumbling block right now is that I am trying to convert the value of my variable from a string to integer.
process_count... (10 Replies)
Discussion started by: MIA651
10 Replies
2. 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
3. Shell Programming and Scripting
I am trying to execute something like this
file=/tmp/test.txt
firstline=$(head -n 1 $file)
value=`echo $firstline | cut -d'=' -f2`
if
then
echo true
fi
i read the first line of a file, cut to the numeric value in the first line and check if it greater than 2
but for some... (11 Replies)
Discussion started by: madhan_dc
11 Replies
4. Shell Programming and Scripting
Using below command
awk 'NR==FNR{A=$1;next}
{sum+=($2*A)}END{OFMT="%20f";print int(sum)}' Market.txt Product.txt
answer:351770174.00000
how to convert this to 351770174.
when i try with below command i am getting different result.
awk 'NR==FNR{A=$1;next}... (3 Replies)
Discussion started by: katakamvivek
3 Replies
5. 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
6. Programming
how can i send an integer via message queue?
i try this, but it doesn't work, child process receive 13345943 instead of 5
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/msg.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <errno.h>
#include <unistd.h>... (2 Replies)
Discussion started by: tafazzi87
2 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 need to create an IF condition. I read a line from a file and get the 5 word using space as a delimited. This word can have only two values either '*' or '1-5'
I need to write an IF condition for two cases. I can either compare it to * or 1-5(or even 1 by cutting and getting only the... (3 Replies)
Discussion started by: kaushys
3 Replies
9. UNIX for Dummies Questions & Answers
Hi
i am writing a shell script; I need to convert a string to integer so that i can use it in the 'awk' command to choose a field.
can you please help me. thank you. (2 Replies)
Discussion started by: abb058
2 Replies
10. Programming
Which function should I use to convert an Integer to a String or Char format ?
Thanx (2 Replies)
Discussion started by: psilva
2 Replies