sudo: source: command not found when executing tcl as sudo
I have a test.tcl (has all permissions) which contains the following-
#!/usr/bin/tclsh
puts "hello, world"
This is how I'm executing my tcl script-
sudo source /opt/test.tcl
I got the output-
sudo: source: command not found
But I checked the availability of source and sudo using whereis command
and they were available-
$ whereis sudo
sudo: /usr/bin/sudo /usr/share/man/man8/sudo.8.gz
$ whereis source
source: /usr/share/man/man1/source.1.gz
However, when I attempt to execute tcl as-
sudo tclsh /opt/test.tcl
I get the expected output-
hello, world
Am I missing something here?
No comments:
Post a Comment