On Sat, 7 May 2016 09:28:28 +0200, Ralf Mardorf wrote: > if [ -z "$(grep $i /proc/mounts)" ]
>Strange, since from command line it worked for ntfs. > >$ sudo mount /dev/sdb1 /mnt/sdb1 It greps, and finds e.g. sdb12, when testing against sdb1, so the issue isn't related to ntfs, but as soon as there is a partition 12, 22, 32, it sorts out 1, 2, 3 in addition to 12, 22, 32 ;). Removing the whole if [ -z "$(grep $i /proc/mounts)" ] should work, since what already is mounted anyway won't get mounted again and for the unneeded dirs in mount I already provided a rmdir solution. However, I didn't tested it, didn't wrote such a script, it just came to mind while doing some other work. Regards, Ralf PS: Removing .* from the other grep might be appropriate too, but shouldn't affect anything for the script. -- xubuntu-users mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/xubuntu-users
