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


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

i have tried

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

Recommended Answers

All 2 Replies

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


as an option.


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

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.