Most powerful examples of Unix commands or scripts every programmer should know

后端 未结 25 1526
遇见更好的自我
遇见更好的自我 2021-01-29 18:14

There are many things that all programmers should know, but I am particularly interested in the Unix/Linux commands that we should all know. For accomplishing tasks that we may

25条回答
  •  暖寄归人
    2021-01-29 18:53

    I use this so much I am actually ashamed of myself. Remove spaces from all filenames and replace them with an underscore:

    [removespaces.sh]

    #!/bin/bash
    find .  -type f -name "* *" | while read file
    do
       mv "$file" "${file// /_}"
    done
    

提交回复
热议问题