I am working on a BASHScript to start wlan monitor mode without interefering with NetworkManager and I am having trouble with this function:
serial_setup(){
local file_name=$1
while IFS =, read PhysicalDevice ItfAlias ItfMode;
do
iw $PhysicalDevice interface add $ItfAlias type $ItfMode
ifconfig $ItfAlias up
done < file_name
}
The above function reads a textfile in format:
PhysicalDevice1,alias1,mode1
PhysicalDevice2,alias2,mode2
PhysicalDevice3,alias3,mode3
I need to find out the cause of error and optimum solution?
EDIT: Here is the full code: MM Script I have to use paste`bin due to trouble pasting and formatting the code here