Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: suchupramod
  • Order by date
  1. suchupramod

    Passing ksh variables into awk

    Hi, I am new to system administration stuff. I just wanted to store some files in the FTP sites of the server. My question is how do I do that, and where the files are actually stored. Thanks in advance Sucheta
  2. suchupramod

    How to pass an awk variable to shell scripts?

    Hi , I have the same problem, and I think I did not understand from the code snippet how to get back variables from awk to shell. My code looks like this: read string awk -v VAR="$string" 'BEGIN { split (VAR,arr," ") {print arr[2]} }' I want to get the values stored in...
  3. suchupramod

    Passing ksh variables into awk

    Hi, is the output from awk '{printf var}' always redirected to a file. In this case when I exactly replicated your code, it says can't open db2 for reading or writing(This file was not there before). When I created a file called as db2, it does not throw any error, but still returns an empty db2...
  4. suchupramod

    Passing ksh variables into awk

    Thanks DB, I used the same as you suggested i.e; used '{print var}' instead of '{print $var}', but says the same thing. Any other idea Sucheta
  5. suchupramod

    Passing ksh variables into awk

    Hi I am using bourne shell and awk embedded in a shell script. I have been trying to use the trick of parameter passing to the awk, but it does not seem to work. Anyone has any idea? What I did was: #!/bin/bash data="some_value" awk -v var="$data" '{print $var}' The output...

Part and Inventory Search

Back
Top