Hi Experts,
I am relatively new to GOLANG and trying a simple program as below which is failing in fetching the output of a file, which works otherwise on the command prompt:
Lang : GOLANG
OS : Linux/Centos
Problem : Using exec.command to get the output of a certain file
Error: Getting no such file or directory error:
command = fmt.Sprintf("cat /sys/bus/pci/devices/%s.0/numa_node", name)
2021/03/15 11:55:59 fork/exec cat /sys/bus/pci/devices/0000:19:00.0/numa_node: no such file or directory
exit status 1
However, the same executed on linux prompt works from the same working directory as the code :
[root-v05 ~]# cat /sys/bus/pci/devices/0000:19:00.0/numa_node
0
[root-v05 ~]#
Please suggest what I may be missing.
Sharan