-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed delimiter for sed w/in v4m_replace function #712
Conversation
|
Not sure if we need/want to list this in the changelog or not. I was concerned the comment might raise more questions. Let me know what you think. |
@@ -279,9 +279,9 @@ function parseFullImage { | |||
function v4m_replace { | |||
|
|||
if echo "$OSTYPE" | grep 'darwin' > /dev/null 2>&1; then | |||
sed -i '' s/"$1"/"$2"/g "$3" | |||
sed -i '' "s;$1;$2;g" "$3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m a little worried these delimiters won’t work properly on OSX, sed is always iffy between the different OSs. Whats an easy way for me to verify this works on my machkne?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sed
has long-running support for other delimiters, but an easy way to confirm on your machine is to check the man page. On my mac:
[2addr]s/regular expression/replacement/flags
Substitute the replacement string for the first instance of the regular expression in the pattern
space. Any character other than backslash or newline can be used instead of a slash to delimit
the RE and the replacement. Within the RE and the replacement, the RE delimiter itself can be
used as a literal character if it is preceded by a backslash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reading man pages makes me sad 😓 , i prefer to test it 😆 I appreciate the input!!
I tested and can doubly confirm things work
I think it makes sense to include in the changelong still |
|
No description provided.