2022 Developer Survey is open! Take survey.

Hot answers tagged

6 votes

How to properly use quotes for a bash function?

ITYM: myfind() { find "$1" '(' -name venv -o -name .tox ')' -prune -o \ -name "$2" -type f -exec grep -Hne "$3" -- {} + } And then: myfind . '*.py' test ...
user avatar
1 vote

find and replace with sed with slash in find and replace string

You can put a simple premat command in front of the sed command in the bash script, which masks the slash in path variables. Let's assume the path variable to be swapped is in $P0: P0="/foo/foo/...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible