setting up a flag inside awk
Hi unix gurus....
i need to set a flag inside awk. i tried many methods for that but couldn't succeed :( like Code:
echo "flag= " $flag i'm using a if condition inside awk... help me out with correct syntax to set a flag and use it so that i will be able to return a value back to main script....... thanks, |
If you want awk to return a value just print it.
Here is an example Code:
#!/bin/bash |
Your little two-line code sample doesn't really explain your problem. You say it's an awk question, but you only showed us two examples of echo, which is a shell command. How exactly does that relate to awk? And what does "set a flag" mean in this context anyway?
If you want to import a shell value into an awk command, use the -v option. Otherwise, show us a larger sample of your code, so we can get an idea of how you want to use the variable in context, along with a more detailed, exact description of your actual goal. |
All times are GMT -5. The time now is 01:22 AM. |