Permission problem
Hai,
I wrote a shell script in which i am using lex output file which reads the input file and generates an output file removing comments inside the input file. While running this script, it gives some permission problem while reading a input file, to avoid this i want to get the permission of the input file and stored in some variable. Then change input file permission to read mode. After execution of lex, i will reset the permission to the input file. How i will do this? pls. help me. |
This works for basic permissions (rwx). I don't know if it will choke on special bits (sticky bit, suid, and sgid). If it does, I trust this is enough of a start for you to figure out how to handle them.
Code:
#!/bin/bash |
All times are GMT -5. The time now is 06:35 PM. |