[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multi-byte character as delimiter
From: |
Haakon Storm Heen |
Subject: |
Multi-byte character as delimiter |
Date: |
Tue, 03 Mar 2020 13:49:16 +0100 |
Hello all!
### My setup
`Darwin 10core.local 19.3.0 Darwin Kernel Version 19.3.0:`
`zsh 5.7.1 (x86_64-apple-darwin19.0)`
`gsed (GNU sed) 4.8`
### What I'm trying
```
cat example.txt|gsed "sā$(printf '\t')ā|ā"
```
### Error
```
gsed: -e expression #1, char 2: delimiter character is not a single-byte
character
```
### Workaround? Feature request?
- Any way around this?
- Should I add multibyte delimiter characters as a feature request?
//Storm
---
The rationale behind this is:
- emoji/unicode are (IMHO) better visual indicators (than plain `ascii`)
- many files I process are scripts that might contain the usual
delimiter characters `/` `_` `|` ...
- replacing a š¤ by mistake with something else is not as detrimental
as replacing `/` or `|` if the file happens to be a shell script.
(`gsed` is symlinked to GNU sed by Homebrew on Mac).
/storm
- Multi-byte character as delimiter,
Haakon Storm Heen <=