I have this script and I need to count the lines inside a file, then pass the number of lines counted to a for loop so that I can get the contents of each line and put it in a variable. My question ...
I'm sure it is relatively simple, I just don't know how to do it. #!/usr/bin/ksh set `iostat` myvar=6 I want to something like echo $($myvar) which i want interpreted as $($myvar) -> $(6) -> value ...
However it may be impossible, I hope I'm just bad man reader =) Is there any way to substitute text in variables on several patterns at time or even using back reference? For example, I have ...