You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When input is UTF-8, cutting on character count - even when it is not aligned with byte count - would be useful. This could be added to cutb as a flag, or could be a separate utility.
This script produces some of the desired behavior:
$ cat multicutb
#!/bin/bash
if [ -z "$1" -o -z "$2" ]; then
echo "Usage: $0 [offset] [length]"
echo "(similar to cutb from hashcat utils)"
exit 1
fi
offset=$1
length=$2
grep -Po "^.{$offset}\K.{$length}"
$ echo Τηεοδ29 | multicutb 1 3
ηεο
(but doesn't cover the negative-offset functionality)
The text was updated successfully, but these errors were encountered:
When input is UTF-8, cutting on character count - even when it is not aligned with byte count - would be useful. This could be added to cutb as a flag, or could be a separate utility.
This script produces some of the desired behavior:
(but doesn't cover the negative-offset functionality)
The text was updated successfully, but these errors were encountered: