Как я могу просмотреть суперблок раздела XFS?

Попробуйте использовать sed

sed '
    /^\//{                    # execite block if line start with «/»
        h                     # put line into hold-space
        d                     # clean, return to beginning
        }                     # end block
    G                         # append hold-space to line
    s/\(.*\)\n\(.*\)/\2 \1/   # exchange first and last part of line
    ' input.file > output.file

и другой вариант

sed '
    /^\//{                    # execute from line started with «/»
        :1                    # mark return point
        N                     # get next line
        /\n\//D               # if such next line started «/» remove previous
                              #+and starts from the beginning with last line
        s/\n/ /p              # change newline with space and prints both lines
        s/ .*//               # removes last line
        $!b1                  # return to marked point with fist line if not end
        d                     # clean all (finish)
        }
    ' input.file > output.file
1
09.01.2018, 23:34
0 ответов

Теги

Похожие вопросы