10 More Discussions You Might Find Interesting
1. 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
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,
I have the following requirement.
There will be following text/line in a file (eg: search-build.txt)
PRODUCT_VERSION="V:01.002.007.Build1234"
I need to update the incremental build number (eg here 007) every time I give a build through script. I am able to search the string and get... (4 Replies)
Discussion started by: drwatson_droid
4 Replies
4. Shell Programming and Scripting
Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP.
I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies
5. 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
6. Shell Programming and Scripting
Hi all,
I'm not sure but I guess, that is a bash version issue.
The script working fine on "GNU bash, version 3.2.25(1)-release Ubuntu".
#!/bin/bash
while IFS=">" read a id val
do
if ]
then
VAL=${id%<*}; ID=${id#*</}
echo $VAL
echo $ID
sed... (5 Replies)
Discussion started by: research3
5 Replies
7. Shell Programming and Scripting
Hi All,
i am doung sup up of amount column in my file.
tot_val=`awk '{a+=$0}END{printf "%.5f\n",a}' amount`
then i have a checksum in footer.
chk_sum=`tail -1 $FILE_NAME | cut -d~ -f7 | cut -c2-`
but the problem is while executing 1st command i am getting :
27720.75000
& while... (3 Replies)
Discussion started by: Amit.Sagpariya
3 Replies
8. Shell Programming and Scripting
I'm new at scripting but I thought I was getting pretty good at it. I've hit a snag. I try to use expr to compute a fraction say: expr 3 / 4, and I'm getting zero. I guess it's just truncating to the integer, in this case 0, but I need the decimal 0.75. What can I do to compute this value in... (2 Replies)
Discussion started by: jeriryan87
2 Replies
9. Shell Programming and Scripting
G'day guys, first post so be gentle.
I need help with some code to work out if a variable (string) contains any integers. The valid variable (string) must contain only letters.
Also need to be able to work out if a variable contains only integers.
Any help greatly appreciated. (7 Replies)
Discussion started by: haz
7 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