Hallo, I'm new in this form and I',m starting using awk for scripting.
I've a problem with a script within Suse Linux/AIX.
Using the following script to give out Names and according values. It should be possible to change the values and write it back to the outputfile. But on a AIX-System the script doesn't work:
#! /bin/awk -f
BEGIN{
anfang=13
FS = "="
out = "hardwareinfo.mif"
print "" > out
}
{name=$0}
{if (NR>anfang&&$0 ~ /Name/) {
print $2
}
}
{if (NR>anfang&&$0 ~ /Value/) {
print $2"\n\nBitte neuen Wert eingeben"
getline x < "-"
name = " Value = \"" x"\""
}
}
{print name >> out
}
Any Idea ?
Thanks and reguards
I've a problem with a script within Suse Linux/AIX.
Using the following script to give out Names and according values. It should be possible to change the values and write it back to the outputfile. But on a AIX-System the script doesn't work:
#! /bin/awk -f
BEGIN{
anfang=13
FS = "="
out = "hardwareinfo.mif"
print "" > out
}
{name=$0}
{if (NR>anfang&&$0 ~ /Name/) {
print $2
}
}
{if (NR>anfang&&$0 ~ /Value/) {
print $2"\n\nBitte neuen Wert eingeben"
getline x < "-"
name = " Value = \"" x"\""
}
}
{print name >> out
}
Any Idea ?
Thanks and reguards