Hi Satya / Ramesh
Not sure how you are gettting database connectivity through awk, but never mind....
Since you do not want to use the echo statment, I assume you also do not want to use the "-v" parameter:
Instead of having the username / password on the command line, you can store them in a file and read that file from within awk. I recommend against storing them in the shell script that the user is running, because the user has to have the ability to read the script in order to run it. Therefore they could just "cat script" and see the username and password. Trying to set this up in a secure way could be problematic. I would probably look at using sudo or something like that, so that the user can run the script as another user, where the other user has the abilitiy to read the script, but the normal user doesnt. (There are ways of hiding that from the user as well).
Anyway, some examples, using the standard ".netrc" file to store the passwords (man netrc to find out what this file is for if you dont already know).
However, this means that you cannot pipe anything else into the awk statement. Assuming you want to be able to have the awk statement process input at the same time as getting the username and password:
Without the two comments, this could be a single line awk statement (not very readable though
Regards, Andrew