Hi all,
First post!
Little-bit of awk experience, need some of the expert help on here. Browsed around here, got a little further, but I am still missing some pieces. Can you help me fill-in my missing awk cells?
Sample data file (leaving out ","'s):
Column 1 Column 2 Column 3 Column 4 etc.
apple banana ice cream 11:11 p/iz/za etc.
attack banana etc 12:34 l/em/on etc.
big tomato etc etc.
blowfish tomato etc etc.
cindy tomato etc
What I have got thus far (pseudo-code):
awk -F","
{
$1=var1
if var1 ~ '/a/' var1=$1-fruit; else
if var1 ~ '/b/' var1=$1-animal; else
etc.
print "this is called" $var "thank you "
$2=var2
print $var2
$3=var3
$4=hmmm need it to just output "pizza" from that format and set to var4
print var3 " " var4
$5=var5
$6=var6
if count ($)2 appears more then once; then
for each instance
{
print $5 $6
}
--
The columns may be alpha-numeric, so I would like to script it as such.
Thank you for any help.
First post!
Little-bit of awk experience, need some of the expert help on here. Browsed around here, got a little further, but I am still missing some pieces. Can you help me fill-in my missing awk cells?
Sample data file (leaving out ","'s):
Column 1 Column 2 Column 3 Column 4 etc.
apple banana ice cream 11:11 p/iz/za etc.
attack banana etc 12:34 l/em/on etc.
big tomato etc etc.
blowfish tomato etc etc.
cindy tomato etc
What I have got thus far (pseudo-code):
awk -F","
{
$1=var1
if var1 ~ '/a/' var1=$1-fruit; else
if var1 ~ '/b/' var1=$1-animal; else
etc.
print "this is called" $var "thank you "
$2=var2
print $var2
$3=var3
$4=hmmm need it to just output "pizza" from that format and set to var4
print var3 " " var4
$5=var5
$6=var6
if count ($)2 appears more then once; then
for each instance
{
print $5 $6
}
--
The columns may be alpha-numeric, so I would like to script it as such.
Thank you for any help.