Hello all, I am trying to pass or trying to get a variable assinged...but seemed like i am doing something wrong here....
so lets say abc.txt(spool the output out) is my file, where i am doing select * Fro mv$version inside my DB and getting some info.
when i cat abc.txt and grep for relase and pipe that to AWK to get 11.2.0.1.0....i get that...but when i pass that on into a vaiable...it do not work....
so when i pass DB_VERSION is my variable....and i am greppging for Relase and the piping that using AWK for my output....i do not get anything back....when i echo $DB_VERSION....it comes out blank....what am i doing wrong here ???
Last edited by Scott; 12-14-2010 at 05:02 PM..
Reason: Code tags, please...
One of your problems is that the shell is expanding the $VERSION of V$VERSION.
Either escape the $ (V\$VERSION), or stop the shell expanding anything between the "EOFs" by using <<"EOF".
I get this output from the select:
That makes your awk a problem too. Nothing starts with "a=", and there is no = in the output, so the -F= serves no purpose.
Hi,
I have an unexpected reboot happening on a Debian 9.9 server.
Yesterday 2019-12-01 at 8:30:34 a reboot happened without me or my team being aware:
/var/log/syslog:Dec 1 08:30:34 xxxx shutdown: shutting down for system reboot
/var/log/syslog:Dec 1 08:30:34 xxxx init: Switching to... (4 Replies)
i have tried to use a sudo command from a user level . but instead of asking for user password it asked for root password . how should i go about it .
james@opensuse:/etc> sudo ifconfig
root's password:
And i wish to ask how should i allow a list of command to be allowed to used for a... (4 Replies)
Hi,
Whenever I open my unix box,after providing username and password I get the following message.
Are you authorised to use this computer as detailed above? (Y)es/(N)o : y
Export: Release 10.2.0.2.0 - Production on Mon May 16 16:00:15 2011
Copyright (c) 1982, 2005, Oracle. All rights... (5 Replies)
Dear All
i am working on windows plattform and i am interested in Aix so i have done IBM Aix certification, can you please suggest Aix filed is good for my carrier,currently i am working as Desktop admin
edit by bakunin: please understand that the question you raised has nothing to do with the... (1 Reply)
Hi All
Plz guide me in setting ssh on local machine so that password will not be asked.
I have written a script abc.ksh on machineA to execute a script sampletest.ksh available on machineB
Conent of abc.ksh is as follows
ssh -q bali@machineB sh ClaimGenFeed/claim/sampletest.ksh... (1 Reply)
linux fedora core2
:) i am trying to write a script to clear, date, pwd and tty a linux termnal or konsole.. when I test the tty against $0 i am, getting a premission denied on the terminal that I am trying to printf to.. I tried using an awk command, test condition, an if then fi clause, but... (6 Replies)
:D could any one answer my previous question...
just looked through logg and found no such question that I had asked.. please any input would help \..
:confused: (2 Replies)