Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Prob Assign Row count to a variable
Name: iam2001 Date: July 11, 2007 at 12:57:46 Pacific OS: Unix CPU/Ram: N/A Product: N/A
Comment:
Is it possible to use a shell script to login to a database (using Teradata), run a query and assign the query result to a local variable defined in the shell? I know it's possible to run teradata SQL through a shell script if teradata is installed on the machine but what I want to do is to assign a value to a variable while at the SQL prompt.
Name: nails Date: July 11, 2007 at 14:33:37 Pacific
Reply:
Using command substituition, it's possible to assign the contents of any valid unix command - including shell scripts - to a shell variable. Using the Bourne shell, it's
Summary: I need to calculate the Yesterday's date and received a good code from Unix forum. I need to assign the yesterdays Date (MONTH and DATE eg. 1229 for Dec 29)to a Variable ,say myvar. $myvar can be used...
Summary: Hi, i have grepped a process number from a file & redirected to temp file. from temp file, I should assign process number to a variable "pnum". to execute a script Select statistics pnumber= summary=...
Summary: Hello, I have a problem assigning two commands into one variable. i did the following CHK=`cat `cat $HOM/temp.log`` $CHK and i did: CHK="cat `cat $HOM/temp.log`" ${CHK} but it is not working.. do you ...