küçük harf içermeyen herhangi bir satırı silmek için tek satırlı sed


13

Yani, temel olarak

BU HAT SİLİNECEKTİR

ve

(BU HAT AYRICA SİLİNECEKTİR)

fakat

Gerçekten, BU HAT

Yanıtlar:


17

Birkaç yol. Olumsuz düşünün:

sed '/[a-z]/!d'    # !x runs x if the pattern doesn't match
grep -v '[a-z]'    # -v means print if the regexp doesn't match
awk '!/[a-z]/'     # !expr negates expr

Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.