Portál AbcLinuxu, 12. května 2025 08:20
#grep -e ^(ir_)[a-z]{4}[0-9]{9} (soubor, venkterem chces hledat)
egrep
nebo 'grep -E
'.
grep -e 'ir_[a-z]{4}[0-9]{9}'
funguje, ale vypisuje cele riadky vyskytu. Ja by som to chcel dostat asi nasledovne:
ir_slsq000246105 ir_kncl000072612 ir_slsq000242558
sed 's: :\n:' ten_soubor.html | grep -e 'ir_[a-z]{4}[0-9]{9}'
sed 's: :\n:' ten_soubor.html | egrep 'ir_[a-z]{4}[0-9]{9}'
src="/counter/c.gif?pt=list&it=SS&ir=ir_slsq000125635,ir_myfr000139587,ir_slsq000253313, ir_slsq000236301,ir_kncl000228692,ir_kncl000212321,ir_kncl000266522,ir_slsq000243873, ir_kncl000250537,ir_myfr000248489,ir_kncl000257495,ir_slsq000252238,ir_kncl000246602,ir_slsq000173336, ir_kncl000159609,ir_kncl000262343,ir_slsq000117256,ir_slsq000236142,ir_slsq000236341,ir_kncl000150016, ir_kncl000211704,ir_kncl000225454,ir_slsq000174661,ir_kncl000263016,ir_slsq000092331,ir_kncl000063707
sed -e 's#,# #g' -e 's#=# #g' \ # Takhle tam vyjmenuješ ty znaky kolem kterých to je -e 's# #\n#g' ten_soubor.html | egrep 'ir_[a-z]{4}[0-9]{9}'
sed -e 's#># #g' -e 's#<# #g' -e 's# #\n#g' ten_soubor.html | \ egrep 'ir_[a-z]{4}[0-9]{9}'
href="/search?md5=28e5ec329d89603c654e3f448d5ae3bf&search_form=keyword&search_type=SS&inst_ref=ir_slsq000236301&submit_type=search"
sed -e 's#,# #g' -e 's#=# #g' -e 's# #g' -e 's# #\n#g' \ ten_soubor.html | egrep 'ir_[a-z]{4}[0-9]{9}'
| uniq -d
na konec prikazu je to dokonali.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.