Skip to content
Snippets Groups Projects
Unverified Commit 6f02568c authored by cladmi's avatar cladmi Committed by Gaëtan Harter
Browse files

openocd.sh: split 'sed' commands on different lines

https://stackoverflow.com/a/24276470

    Labels and branching commands (e.g., b) must be followed by an actual
    newline or continuation via a separate -e option.
parent 291a80c6
No related branches found
No related tags found
No related merge requests found
...@@ -170,7 +170,14 @@ _split_banks() { ...@@ -170,7 +170,14 @@ _split_banks() {
# name nrf51 base 0 size 0 bus_width 1 chip_width 1 # name nrf51 base 0 size 0 bus_width 1 chip_width 1
# name nrf51 base 268439552 size 0 bus_width 1 chip_width 1 # name nrf51 base 268439552 size 0 bus_width 1 chip_width 1
sed -n '/^{.*}$/ {s/\} /\}\n/g;s/[{}]//g;p}' # The following command needs specific osx handling (non gnu):
# * Same commands for a pattern should be on different lines
sed -n '
/^{.*}$/ {
s/\} /\}\n/g
s/[{}]//g
p
}'
} }
# Outputs bank info on different lines without the '{}' # Outputs bank info on different lines without the '{}'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment