Since I can only run this script from where script is located at the moment, Is it possible to run this script from anyware. I mean anyware under the root . Thanks
There is nothing which confines this script to a particular directory. The output file will be created in the directory where it runs but just add an absolute path to the redirection done >/path/to/file.txt if you think that's a problem.