I'm trying to assign command with parameters to variable and later in function perform this command:
get_list "ps uwax" arg2 arg3 #call function with 3 args
for entry in $($1); do
echo "NAME$3: $entry" >> /file.$2
but the output is:
ps uwax: command not found
The problem is it doesn't recognize it as ps with arguments, but as a single command "ps uwax". Any ideas how to fix it? Thanks.