1. Bash Brace Expansion
# touch test{1,3,5,7,9,11}
# ls test{1,3,5,7,9,11}
=> test1 test11 test3 test5 test7 test9
# ls test{1,7}
=> test1 test7
# ls test{1..7}
=> test1 test3 test5 test7
# ls test{1..11..4} // 1부터 11까지 4씩 증감
test1 test5 test9
# echo /dev/sd{a..z}
=> /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi /dev/sdj /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo /dev/sdp /dev/sdq /dev/sdr /dev/sds /dev/sdt /dev/sdu /dev/sdv /dev/sdw /dev/sdx /dev/sdy /dev/sdz
# echo /dev/sd{z..x}
/dev/sdz /dev/sdy /dev/sdx
2. 문자열 치환
# sed -i 's/SET_IPOIB_CM=auto/SET_IPOIB_CM=no/g' /etc/infiniband/openib.conf
댓글 없음:
댓글 쓰기