10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a person script which has a following statement.
BUILD_FOLDER=$2
i=$((${#BUILD_FOLDER}-1))
if
then
BUILD_FOLDER=$BUILD_FOLDER/
#echo $BUILD_FOLDER
else
echo " "
#echo $BUILD_FOLDER
fi
What and how this statement works ?
i=$((${#BUILD_FOLDER}-1)) (5 Replies)
Discussion started by: ilugopal
5 Replies
2. Shell Programming and Scripting
I have written a shell script to calculate dbsize :-
db2 "call get_dbsize_info(?,?,?,-1)" | sed -n '8p' | awk -F : '{print $2}'
dbsize=`db2 "call get_dbsize_info(?,?,?,-1)" | sed -n '8p' | awk -F : '{print $2}'`
echo $dbsize
when I execute it the syntax works but it's not... (11 Replies)
Discussion started by: lazydev
11 Replies
3. UNIX for Dummies Questions & Answers
Hi guys i need to assign to a $var the name of a directory i've created before like this:
mkdir cd /esb/cargomax/fuse/SMX_SV_$(date +%F)
i guess this is very simple, but.....
Thanks!! (3 Replies)
Discussion started by: Newer
3 Replies
4. Linux
Hi Guys,
It may sound silly questions but I am really confused and forgot the sequence to set IP in REDHAT 6.
1st type
system-config-network
then I give IP as 192.168.1.78
Subnet as 255.255.255.0
Then do
/etc/init.d/network restart
Then when I check with ifconfig eth0... (1 Reply)
Discussion started by: manalisharmabe
1 Replies
5. Shell Programming and Scripting
#! /bin/bash
if ; then
echo "Set number "
else
k=$1
sqlplus ${scheme}/${apsswd}@${server} @query.sql $k
fi
file query.sql looks like this
select * from tab1 where number =${k};
===================================
it doesnt work
my question is how to assign k value in last... (2 Replies)
Discussion started by: kvok
2 Replies
6. Shell Programming and Scripting
DATA
---------------
0
Please tell me, if the file contains 0 after --. then assign the value to variable $var=false,
DATA
---------------
1
then $var=true, (2 Replies)
Discussion started by: sandy1028
2 Replies
7. Shell Programming and Scripting
Hi Experts,
I am facing some problem while developing the script.My input config.csv file contains the three columns namely pathname,filename,filetype.Based on the file type i have to use ftp command that is if filetype=csv then do ftp.
The input file is
cat config.csv... (13 Replies)
Discussion started by: Amey Joshi
13 Replies
8. Shell Programming and Scripting
i want to assign a anme for a string, i got the things below, but it doesn't work.
MParc1=``
if
then
$MPrac1=`Prac1` # assign $MPrac1 to Prac1
else
$MPrac1=`` #assigne $MPrac1 to nothing
fi
echo "${MPrac1} >>file
Output: (if num is 0)
Prac1
can you please... (6 Replies)
Discussion started by: mingming88
6 Replies
9. Shell Programming and Scripting
Hi Everyone,
How to assign the specific value which return from database?
here is the return value from database -->
(return status = 0)
0 <----- this
I only need to get the "0" .. assign to another declare variable.
hope someone will help me..
Please
thank you.. (4 Replies)
Discussion started by: ryanW
4 Replies
10. Shell Programming and Scripting
I have to assign a result of a query to a vairable like this
how can i do this
Query = select count(*) from table
x=`db2 ${Query}| sed -n '4p'`
but this doesn't work, is there any other way to assign the result without redirecting the result to temp file. .
Thanks
Mark. (3 Replies)
Discussion started by: markjason
3 Replies