Fdisk and grep command not working in udev trigger

Try "enhanced logging":

DEVNAME=$(fdisk -l |& tee -a $LOG_FILE | grep FAT16 |& tee -a $LOG_FILE | awk '{print $1}' |& tee -a $LOG_FILE)

and post the log file. Will that be the only disk having the FAT16 type?

Please also print the user that the script is executed under.

Hi thank you very much for your time, is solved now other way around.

to this link Auto-mounting USB storage with udev >> Axllent.org

1 Like