Hello all, I am having a problem with awk's string split function.
I have a string that has a number at the end, I am trying to remove the alpha portion of the string and just have the numeric part. Here is my code and the result:
BEGIN {
word = "$category121";
split(word, a, 121)
print a[1]}
robert@RF5:~$ awk -f switch2.awk
$category
robert@RF5:~$
-------------------------
Is there a way to split "$category" and "121" in to two seperate variables?
Thank you for your help.
Robert