Unix, Linux, JBoss, Websphere, Ant, Python, Oracle DB, Arduino, Raspberry Pi.
sed etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
sed etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
10 Kasım 2017 Cuma
31 Ekim 2013 Perşembe
30 Mart 2013 Cumartesi
5 Temmuz 2012 Perşembe
3 Temmuz 2012 Salı
Unix - C kodunun main() fonksiyonunu yazdır
sed -n -e '/main[[:space:]]*(/,/^}/p' sourcefile.c | more
Unix - sed örnekleri
string1'i string2 ile değiştir:
sed 's/string1/string2/g'
# ile baslayanlari sil:
sed -e '/^#/d' dosya_adi
6 ile bitenleri sil:
sed -e '/6$/d' dosya_adi
2 uzunluklu satirlari sil:
sed -e '/^..$/d' dosya_adi
5 ile başlayanları bas:
sed -n "/^5/p" file
ilk satıırı sil:
sed -e '1d' /etc/services | more
sed 's/\(.*\)1/\12/g'
Remove comments and blank lines:??????????????
sed '/ *#/d; /^ *$/d'
Print 1000th line:
sed -n '1000{p;q}'
sed ':a; /\\$/N; s/\\\n//; ta' Concatenate lines with trailing \
sed 's/[ \t]*$//' Remove trailing spaces from lines
sed 's/\([`"$\]\)/\\\1/g' Escape shell metacharacters active within double quotes
seq 10 | sed "s/^/ /; s/ *\(.\{7,\}\)/\1/" Right align numbers
sed -n '10,20p;20q' Print lines 10 to 20
sed -n 's/.*<title>\(.*\)<\/title>.*/\1/ip;T;q' Extract title from HTML web page
sed -i 42d ~/.ssh/known_hosts Delete a particular line
sed 's/string1/string2/g'
# ile baslayanlari sil:
sed -e '/^#/d' dosya_adi
6 ile bitenleri sil:
sed -e '/6$/d' dosya_adi
2 uzunluklu satirlari sil:
sed -e '/^..$/d' dosya_adi
5 ile başlayanları bas:
sed -n "/^5/p" file
ilk satıırı sil:
sed -e '1d' /etc/services | more
Modify anystring1 to anystring2??????????????
sed 's/\(.*\)1/\12/g'
Remove comments and blank lines:??????????????
sed '/ *#/d; /^ *$/d'
Print 1000th line:
sed -n '1000{p;q}'
sed ':a; /\\$/N; s/\\\n//; ta' Concatenate lines with trailing \
sed 's/[ \t]*$//' Remove trailing spaces from lines
sed 's/\([`"$\]\)/\\\1/g' Escape shell metacharacters active within double quotes
seq 10 | sed "s/^/ /; s/ *\(.\{7,\}\)/\1/" Right align numbers
sed -n '10,20p;20q' Print lines 10 to 20
sed -n 's/.*<title>\(.*\)<\/title>.*/\1/ip;T;q' Extract title from HTML web page
sed -i 42d ~/.ssh/known_hosts Delete a particular line
Etiketler:
metin işleme,
replace,
sed,
test edilmedi,
unix
Kaydol:
Kayıtlar (Atom)