Date:        Sat, 19 Mar 2016 21:37:03 +0100
    From:        "Ian D. Leroux" <[email protected]>
    Message-ID:  <[email protected]>

  | Surely there
  | has to be a better, less brittle way of getting the required
  | information.  Can anyone give me a hint as to what it might be?

try
        eval set -- $( mount -t tmpfs | while read -r line; do
                      fs=${line#tmpfs on }; fs=${fs% type tmpfs*};
                      echo "'${fs}'"; done )

after which "$@" should be the tmpfs moounted filesystems, even if
they contain odd characters (including spaces).

Then
        for fs
        do
                whatever you want using "${fs}"
        done

Do this in a function, so you get a free $@ to play with...

kre


Reply via email to