uniq -cの出力を変更する必要があります:(はい)
92 root
80 user
存在する
root 92
user 80
awk forceを使用せずにどうすればよいですか?
ベストアンサー1
ここでGNUを使うことができますsed
:
... | sed -E 's/(\S*) (\S*)/\2 \1/'
またはPOSIXly、
... | sed 's/\([^ ]*\) \(.*\)/\2 \1/'
uniq -cの出力を変更する必要があります:(はい)
92 root
80 user
存在する
root 92
user 80
awk forceを使用せずにどうすればよいですか?
ここでGNUを使うことができますsed
:
... | sed -E 's/(\S*) (\S*)/\2 \1/'
またはPOSIXly、
... | sed 's/\([^ ]*\) \(.*\)/\2 \1/'