10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Can the below be clarified please. i just want to know what is the difference between the two ways of assigning variables as mentioned below.
export SRC_TBL=${SRC_TBL-"MMA_COPAY_PLN_FACT_STG"}
export SRC_TBL="MMA_COPAY_PLN_FACT_STG"
thanks in advance :)
Arun (1 Reply)
Discussion started by: Arun Mishra
1 Replies
2. Red Hat
I ran the following command.
cat abc.c > abc.c
I got message the following message from command cat:
cat: abc.c : input file is same as the output file
How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies
3. Shell Programming and Scripting
i have variables RECIPIENTS_DEVL,RECIPIENTS_UACC,RECIPIENTS_PROD
i have a case statement to get the phase variable:
case ${WMD_UPHASE1} in
u) WMD_UPHASE4=UACC;;
i) WMD_UPHASE4=DEVL;;
p) WMD_UPHASE4=PROD;;
d) WMD_UPHASE4=DEVL;;
*) WMD_UPHASE4=DEVL;;
esac
I am unable to... (3 Replies)
Discussion started by: Arun Mishra
3 Replies
4. Shell Programming and Scripting
Hi Everyone,
I have a flatfile "inbox.txt" which contains some information:
Location 0, folder "Inbox", SIM memory, Inbox folder
SMS message
SMSC number : "+24800000023"
Sent : Sat 04 Aug 2012 09:01:00 PM +0700
Coding : Default GSM alphabet... (5 Replies)
Discussion started by: testcase
5 Replies
5. Shell Programming and Scripting
Please help me to automatically assign the output of awk command to the variables cs3, cs4, cs5 and cs6 using a for loop. The below code is not working.
for i in 3 4 5 6
do
cs$i=`awk -F"|" 'BEGIN{sum=0}{sum=sum+$'$i'}END{printf("%d\n", sum)}' css`
done
echo $cs3 $cs4 $cs5 $cs6 (9 Replies)
Discussion started by: thulasidharan2k
9 Replies
6. UNIX for Dummies Questions & Answers
Hey, I'm completely new at this and I was wondering if there is a way that I would be able to redirect the log files in a directories standard output and standard error into and excel spreadsheet in anyway?
Please remember don't use too advanced of terminology as I just started using shell... (6 Replies)
Discussion started by: killaram
6 Replies
7. Shell Programming and Scripting
Hi GUYS,
I have function. I am assigning a line count to count variable. But it is throwing an error at this line.
function_recur (){
#file being created in this function
lenth = `wc -l function_outpu.dat`;
echo $lenth;
}
this is the error i got
rec.ksh: lenth: not found.
... (3 Replies)
Discussion started by: mac4rfree
3 Replies
8. UNIX for Advanced & Expert Users
Hi,
Is there any way to assign defaults values to the shell variables without reassigning them ( restarting the session)
for example
after login the value of ORACLE_HOME=/a/b/c
i have changed this value from the console
export ORACLE_HOME=/c/d
now what if i want the value exported to... (1 Reply)
Discussion started by: clx
1 Replies
9. Shell Programming and Scripting
I do a lot of command line scripting to capture data from files or other command output. I've checked in a number of Unix and scripting books but for the life of me I can't find out how to asign field data from nawk output into variables that I can manipulate later. For example, reading a two... (6 Replies)
Discussion started by: steveje0711
6 Replies
10. UNIX for Dummies Questions & Answers
Before I even attempt this, is it possible to grep for a pattern, maybe a partial sentence like "go to page 3", assign that to a variable and then use awk or something to pull out the 3 and assign it to a variable? So first I would have
Gotopg = "go to page 3"
then
page = 3 (9 Replies)
Discussion started by: k@ssidy
9 Replies