Subsystem shell
Hey all :)
I'm trying to get port numbers to sit in an array in a bash script but not sure how to use subsystem shells properly. Can anyone tell me what i've done wrong in the following: Code:
#! /bin/bash |
I can't tell what the cut statements are doing, but I changed the increment
for the loop counters. Code:
FILE=/tmp/a.tmp |
I tried this but it still doesn't work properly - the count should go up and as it does it should add a port to the array....
I.e. PORT[0] = 22 PORT[1] = 25 Not sure whats going on, this should just ork but thats why I think it's got something to do with the subshell... |
What output do you get from the changes I posted?
What is the input line from the file? |
From what you posted I get a list of ports but it only lists once and if I add a
Code:
echo ${CNT} The input line from the file is the cat statement that cuts the line with the ports out and then cuts the port from line. |
All times are GMT -5. The time now is 01:23 AM. |