Last active
October 7, 2018 12:34
-
-
Save rasor/01b2a0dc75eac16c029609dd38934135 to your computer and use it in GitHub Desktop.
various-bash-shell-scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Find files (subfolder included -R) having somesearchstring in filename (and ignore case -i) | |
| # Usage: sh find-filename.sh somesearchstring | |
| # https://stackoverflow.com/questions/11328988/linux-find-files-with-name-containing-string/11329078#comment92302732_11329078 | |
| ls -R | grep -i $1 | |
| # If you only want to find PDF files | |
| # ls -R | grep -i $1 | grep -F -i '.pdf' | |
| # https://www.lifewire.com/pass-arguments-to-bash-script-2200571 | |
| # done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Split a file into X lines | |
| # https://stackoverflow.com/questions/3066948/how-to-file-split-at-a-line-number | |
| split -l 30000 test.log | |
| # done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment