리눅스 shuf

(Shuf에서 넘어옴)

1 개요[ | ]

/usr/bin/shuf
리눅스 shuf

2 예시 1: 숫자[ | ]

[root@localhost ~]# shuf -i 1-6
4
3
1
2
5
6
[root@localhost ~]# shuf -i 1-6 -n3
1
5
3
[root@localhost ~]# shuf -i 1-6 -n3 | xargs -n3
1 5 4

3 예시 2: 문자열[ | ]

[root@localhost ~]# ls /
bin   dev  home  lib64       media  opt   root  selinux  sys  usr
boot  etc  lib   lost+found  mnt    proc  sbin  srv      tmp  var
[root@localhost ~]# ls / | shuf -n3
var
proc
selinux

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}