Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script Mod Needed

Featured Replies

ok, i am not a bash script person at all, this should be simple but i am at a loss

I have a expander attached, so some of my drive devices are 4 characters long, 5 with partition number added

need to know how to modify the following code:

load_drives()
{
    ls -l /dev/disk/by-id/ | egrep 'ata\-' > ${TMPFILE}

    # rwxrwxrwx 1 root root  9 Apr 20 08:04 ata-Hitachi_HTS722020K9SA00_071007DP0400DTG101HA -> ../../sdf
    # lrwxrwxrwx 1 root root 10 Apr 20 08:04 ata-Hitachi_HTS722020K9SA00_071007DP0400DTG101HA-part1 -> ../../sdf1
    # I know it's inefficient.
    # but piping mount into loop creates a subprocess
    # whereby the export inside the loop never gets
    # back to the parent.

    i=0
    while read PERMS LINKS OWNER GROUP XX MONTH DD HHMM MODEL LINKER DEV
    do
        # ${parameter:offset:length}
        NAME=${DEV:6:4}                 # Save Whole Drive
        DEV=${DEV:6:3}
        # Remove Partition #
        if [ ${DEV} != ${NAME} ]; then continue; fi
        for OMODEL in ${OMIT_MODELS[*]}
        do  length=${#OMODEL}
            if [ ${MODEL:0:$length} = ${OMODEL} ];then OMIT=1;fi
        done
        if [ ${OMIT:=0} -gt 0 ]
           then OMIT=0
                continue
        fi
        DRIVES[$i]="/dev/${DEV}"
        MODELS[$i]="${MODEL}"
        CHOICE[$i]="/dev/${DEV} ${MODEL}"
        ((i++))
    done  < ${TMPFILE}

    rm -f ${TMPFILE}

}

in the NAME and DEV i changed the length to 5 and 4, but that still gives me listing with the partition number

any assistance?

 

thanks

Myk

tmpfile

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.