Script error?

stjude1982

New Member
Credits
82
Can anyone tell me why simple file report script as below, works if I type out full path name, or even using '.' for current directory but will not allow use of '~' for home directory? See screenshot of script running below, also:

1596693647962.png

1596693759093.png

Any help understanding this would be greatly appreciated, thank you.
 


f33dm3bits

Well-Known Member
Credits
5,448
Add -x behind the shebang to debug the script or just run the script like this:
Code:
bash -x filereport.sh
It will then literally give you output of what it is executing and that way you can see where it's going wrong.
 


Members online


Top