I am reading lines from a file that contain a number sign (#) before a three or four digit number:
#1043
#677
I can remove the '#' and get just the number. However, I then want to assign that number to a variable and use it as part of a path further on in my program:
/mydir/10/1043 for example
print -n {$second#?} gives me the 1043 but I have been unsuccessful assigning this result to a variable - I tried company = {$second#?} but company has no value.
I'm new to this, so any help would be appreciated.