Last active
November 13, 2020 14:20
-
-
Save matthewcosgrove/69327389c6d5bd9f222ff2d9d68cc228 to your computer and use it in GitHub Desktop.
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
| # Some useful commands for reference |
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
| # https://unix.stackexchange.com/a/202326 | |
| # $ type local | |
| # local is a shell builtin | |
| # Bash shell builtins are documented inside man bash and their documentation can be also invoked with help | |
| help type | |
| help local | |
| # $ type -a echo | |
| # echo is a shell builtin | |
| # echo is /usr/bin/echo | |
| # echo is /bin/echo |
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
| find /home/ubuntu/poc-deployment-pipeline/ \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i 's/repo-ci/concourse/g' | |
| # https://stackoverflow.com/a/16957078 | |
| grep -rnw '/path/to/somewhere/' -e 'pattern' |
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
| # check affected files in a git repo | |
| git grep -I --files-with-matches --perl-regexp '\r' HEAD | |
| # https://stackoverflow.com/questions/14219092/bash-script-and-bin-bashm-bad-interpreter-no-such-file-or-directory | |
| # Specifically https://stackoverflow.com/a/29747593 | |
| sed -i -e 's/\r$//' scriptname.sh | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment