Re: [go-nuts] Error while executing exec.command

2021-03-15 Thread Sharan Guhan
Thanks a bunch !! 'ioutils.ReadFIle' did the trick :) Sharan On Mon, Mar 15, 2021 at 3:43 PM 'Axel Wagner' via golang-nuts < golang-nuts@googlegroups.com> wrote: > I would also suggest to just use os.ReadFile > , instead of executing `cat`. The > latter is po

Re: [go-nuts] Error while executing exec.command

2021-03-15 Thread 'Axel Wagner' via golang-nuts
I would also suggest to just use os.ReadFile , instead of executing `cat`. The latter is pointless overhead and unnecessarily fragile. On Mon, Mar 15, 2021 at 11:40 PM Amit Saha wrote: > > > On Tue, 16 Mar 2021, 9:37 am Sharan Guhan, wrote: > >> Hi Experts,

Re: [go-nuts] Error while executing exec.command

2021-03-15 Thread Amit Saha
On Tue, 16 Mar 2021, 9:37 am Sharan Guhan, wrote: > 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.c

[go-nuts] Error while executing exec.command

2021-03-15 Thread Sharan Guhan
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