i am trying to capture the output of the command fuser into an array in shell script. based on other similar queries I used below lines in shell.
p_list = ( $("fuser -m /mnt/usb") )
But i am getting below error
./capture.sh: line 8: syntax error near unexpected token `('
./capture.sh: line 8: ` p_list = ( $(fuser -m /mnt/usb) )'
The fuser output is the process list using the above path as below
~# fuser -m /mnt/usb
9261 1089 8526
Why is this issue? Any hints. How to i achieve this.