Greetings.
This is a question about the ksh environment.
Let's say that I want to evaluate a path name provided to my script as shown here: ./test.ksh /tmp/user-data/stuff
This prior example is straight forward as there isn't anything that needs to be interpreted. The script variable shows exactly what was used during the script invocation.
Now suppose the data provide was something messy such as: ./test.ksh /tmp/user-data\/st$uf#f
As you can see, the data contains a "\", "$" and "#". The script sees the data as: /tmp/user-data/st#f , having lost the "\" and "$" as they were parsed accordingly.
Is there a way to read the input so that the script sees exactly what was presented, including any and all special characters?
Any help would be appreciated.
G
This is a question about the ksh environment.
Let's say that I want to evaluate a path name provided to my script as shown here: ./test.ksh /tmp/user-data/stuff
This prior example is straight forward as there isn't anything that needs to be interpreted. The script variable shows exactly what was used during the script invocation.
Now suppose the data provide was something messy such as: ./test.ksh /tmp/user-data\/st$uf#f
As you can see, the data contains a "\", "$" and "#". The script sees the data as: /tmp/user-data/st#f , having lost the "\" and "$" as they were parsed accordingly.
Is there a way to read the input so that the script sees exactly what was presented, including any and all special characters?
Any help would be appreciated.
G