mirror of
https://github.com/token2/fido2-manage.git
synced 2026-04-09 10:45:39 +00:00
Merge pull request #29 from Ferenc-/fix-device-listing-regex
Simplify and fix device name extraction
This commit is contained in:
2
fido2-manage.sh
Normal file → Executable file
2
fido2-manage.sh
Normal file → Executable file
@@ -123,7 +123,7 @@ if $list; then
|
|||||||
echo "$command_output" | while read -r line; do
|
echo "$command_output" | while read -r line; do
|
||||||
if [[ $line =~ ^([^:]+) ]]; then
|
if [[ $line =~ ^([^:]+) ]]; then
|
||||||
|
|
||||||
echo "Device [$device_count] : $(echo "${line}" | grep -oP '\(([^)]+)\)' | sed 's/(\(.*\))/\1/')"
|
echo "Device [$device_count] : $(echo "${line}" | grep -oP '(?<=\()(.+)(?=\))')"
|
||||||
|
|
||||||
device_count=$((device_count + 1))
|
device_count=$((device_count + 1))
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user