Hi Folks,
I was trying to form a command using different variables and assigned to one variable including options.
Sample:
CMD="mount"
CMD=$CMD" /dev/sdb"
CMD=$CMD" /mnt/disk0/"
echo "The command is: $CMD"
$CMD
Output:
The command is: mount /dev/sdb /mnt/disk0
Error: No such file or directory:
""
Note: Both the /dev/sdb and /mnt/disk0 exists.
If I am running the same command without using variable from the script, it was working fine.
Please help me to get out of this problem.
Bookmarks