Thread: umountfs sed explanation
hello all,
trying understand shutdown unmounting process.
traced /etc/init.d/umounfs script seems responsible unmounting mounted partitions. however, not see how script unmounting partitions...
because don't understand sed well.
can explain
sed -n '0,/^\/[^ ]* \/ /p' /proc/mounts
doing?
understand prints selected lines somehow. condition?
1. read man page 0,addr2 portion, frankly, don't understand explanation.
" start out in "matched first address" state, until addr2 found. similar 1,addr2, except if addr2 matches first line of input 0,addr2 form @ end of range, whereas the 1,addr2 form still @ beginning of range."
2. pattern /^\/[^ ]* \/ / match?
isn't following?
line starts "/" followed non-space characters followed space , "/" followed space?
apparently understanding wrong, because first line of output is
rootfs / rootfs rw 0 0
guidance, , explanation why case highly, highly appreciated.
thank in advance.
hi,
understanding of pattern correct.
says print lines start of file first line matches pattern.code:0,/pattern/p
in short, printing contents of /proc/mount until & including mount point root of filesystem (ie. / )
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [all variants] umountfs sed explanation
Ubuntu
Comments
Post a Comment