minus-squareunlawfulbooger@lemmy.blahaj.zonetoLinux@programming.dev•regex and awk...linkfedilinkarrow-up4·edit-224 days agoYou could try [0-9] instead? awk '/\/dev\/loop[0-9]/ {print}' If you have a larger sample of input and desired output, people can help you better. linkfedilink
unlawfulbooger@lemmy.blahaj.zone to Programmer Humor@lemmy.ml · 2 years agoOn this deserted island I could use some help() lemmy.blahaj.zoneimagemessage-square0linkfedilinkarrow-up12arrow-down10
arrow-up12arrow-down1imageOn this deserted island I could use some help() lemmy.blahaj.zoneunlawfulbooger@lemmy.blahaj.zone to Programmer Humor@lemmy.ml · 2 years agomessage-square0linkfedilink
You could try [0-9] instead?
awk '/\/dev\/loop[0-9]/ {print}'
If you have a larger sample of input and desired output, people can help you better.