0

i've just given a script to update and maintain by my manager, but its bash and i dont know that much about it..

i currently have a script that looks through .txt files for given serials that then reports to a php webpage.

within this script we have around 20 variables 1 for each testset labelled ts1 - ts20

most the testsets have a standard 7 digit serial that we look for and this is what is assigned to each variable..eg

TS1=1234567
TS2=2345678

however i have one testset that has a unique serial because of the tests it carries out.
710000/393

i have tried
TS20=710000/393
TS20="710000/393"
TS20=710000"/"393

but no matter what i do it wont read it even though the testsheets read this serial.
is there somthing i am doing wrong with the variable? i thought encapsulating it would allow the / to be read properly

3
Contributors
2
Replies
16
Views
4 Years
Discussion Span
Last Post by Watael
0

Your second example should work. What platform+version+kernel+bash version are you running? You could try this:

TS20="710000\/393"

as an option.

0

hi,

$ TS20="710000/393"
$ echo "$TS20"
710000/393

how do get variables from txt file?
I'm not sure it's a bash problem, but rather a php one.
Did you test bash script without being called in php?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.