HI everyone, can anyone help me with this:
I want to list all the files having some user's entered string as substring 
in their name.
So I wrote these commands:





*scanner := bufio.NewScanner(os.Stdin)fmt.Println("Enter the substring 
name")scanner.Scan()search:=scanner.Text()cmd1,err:=exec.Command("bash", 
"-c", "find . -name '*$search*'")*

But I think the variable search is not getting used inside exec command.

Can anyone please let me know, how I can use the golang variable in bash 
command this?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3f74da22-624c-4aa9-abc6-9d61943c1c82n%40googlegroups.com.

Reply via email to