Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] control which tmpfs get unmounted at swapoff
Date: Sat, 19 Mar 2016 21:37:03 +0100
From: "Ian D. Leroux" <idleroux%fastmail.fm@localhost>
Message-ID: <20160319213703.0ed2bfa10139f9c700a4b161%fastmail.fm@localhost>
| 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
Home |
Main Index |
Thread Index |
Old Index