Forums Neueste Beiträge
 

grep findet meinen Suchbegriff nicht

26/05/2014 - 14:30 von Joachim Hartman | Report spam
Hallo Linux-Profis!
in einem bash-Script möchte mit der Zeilen

URL="http://www.star-tankstellen.de/tank...finder_pi1[tsid]="$1
merker=?????????????????????
preise=$(wget -q -O - $URL | grep -m 1 $merker)

den hier durch Paragraphenzeichen abgegrenzten Text §"title":"§ suchen.
Alle meine Versuche in der Form
merker="\"title\":\"" oder merker='\"title\":\"' oder ...
sind klàglich gescheitert! was mache ich falsch?

Gruß aus der Stadt der CeBIT
jochen


Zum AUSTRAGEN schicken Sie eine Mail an debian-user-german-REQUEST@lists.debian.org
mit dem Subject "unsubscribe". Probleme? Mail an listmaster@lists.debian.org (engl)
Archive: https://lists.debian.org/538332AC.3040405@gmx-topmail.de
 

Lesen sie die antworten

#1 Joachim Hartman
26/05/2014 - 16:10 | Warnen spam
Hallo Rolf,
die Original-Datei findest du hier:
http://www.star-tankstellen.de/tank...finder_pi1[tsid]75

Hier ein Auszug daraus:
####################################################################
<!-- CONTENT ELEMENT, uid:695/text [begin] -->
<a id="c695"></a>
<!-- Header: [begin] -->
<div class="csc-header csc-header-n1"><h1
class="csc-firstHeader">Tankstellenfinder</h1></div>
<!-- Header: [end] -->

<!-- CONTENT ELEMENT, uid:695/text [end] -->

<!-- CONTENT ELEMENT, uid:177/list [begin] -->
<a id="c177"></a>
<!-- Plugin inserted: [begin] -->



<!--

BEGIN: Content of extension "user_astfinder", plugin "user_astfinder_pi1"

<div class="user-astfinder-pi1">
<table class='tsdetail'><tr><td
id='tsdetail_td_map'><table><tr><td><div style="width:300px;height:
300px;" id="map"></div><script
src="http://google-maps-utility-library-...x.js"
type="text/javascript"></script>
<script type="text/javascript">
var gMapHelperData =
{"directions":true,"icons":[{"image":"fileadmin\/images\/ci\/star_google_icon.png","iconWidth":32,"iconHeight":32,"iconAnchorX":16,"iconAnchorY":16,"infoWindowAnchorX":16,"infoWindowAnchorY":16,"shadow":"fileadmin\/images\/ci\/star_shadow_google_icon.png","shadowWidth":62,"shadowHeight":32}],"mapId":"map","centerLat":"52.411117","centerLon":"9.747943","minLon":9.7479426,"minLat":52.4111169,"maxLon":9.7479426,"maxLat":52.4111169,"markers":[{"lon":"9.7479426","lat":"52.4111169","html":"<div
class=\"title\">star Tankstelle<\/div><div class=\"section1\"><p>Berkay
Yilmaz<br \/>Sahlkamp 33<br \/>30179 Hannover<\/p><\/div>","title":"star
Tankstelle Berkay Yilmaz, Sahlkamp 33, 30179 Hannover","tooltip":"star
Tankstelle"}],"zoomEncompass":true,"routing":false,"routingData":{"start":{"lon":null,"lat":null},"stop":{"lon":null,"lat":null}}};
</script>
<script src="/fileadmin/js/maps.js"
type="text/javascript"></script><script language="javascript"
type="text/javascript" charset="utf-8">$(document).ready(function(){
onLoad(); });</script></td><td></td></tr></table></td><td
id='tsdetail_td_adr'><table><tr><td><strong>Sahlkamp
33</strong></td></tr><tr><td>30179 Hannover</td></tr><tr><td>
</td></tr><tr><td><strong>Tel: </strong>0511 -
635633</td></tr><tr><td><strong>Fax: </strong>0511 -
673507</td></tr><tr><td> </td></tr><tr><td><strong>Unsere
Öffnungszeiten:</strong></td></tr><tr><td>Mo-Fr 05:30-22:00<br />Sa
07:00-22:00<br />So 08:00-22:00</td></tr></table></td><td
id='tsdetail_td_cards'><table><tr><td><img alt="star Flottenkarte"
title="star Flottenkarte"
src="fileadmin/images/tankstellenfinder/karten/star_flottenkarte.png"
/></td><td><img alt="star Gutscheinkarte" title="star Gutscheinkarte"
src="fileadmin/images/tankstellenfinder/karten/gutscheinkarte.png"
/></td></tr><tr><td><img alt="EC Cash" title="EC Cash"
src="fileadmin/images/tankstellenfinder/karten/ec_cash.png"
/></td><td><img alt="Giro Card" title="Giro Card"
src="fileadmin/images/tankstellenfinder/karten/ec_giro_card.png"
/></td></tr><tr><td><img alt="Maestro" title="Maestro"
src="fileadmin/images/tankstellenfinder/karten/maestro.png"
/></td><td><img alt="MasterCard" title="MasterCard"
src="fileadmin/images/tankstellenfinder/karten/mastercard.png"
/></td></tr><tr><td><img alt="Maestro paypass" title="Maestro paypass"
src="fileadmin/images/tankstellenfinder/karten/maestro_paypass.png"
/></td><td><img alt="MasterCard paypass" title="MasterCard paypass"
src="fileadmin/images/tankstellenfinder/karten/master_card_paypass.png"
/></td></tr><tr><td><img alt="VPay" title="VPay"
src="fileadmin/images/tankstellenfinder/karten/v_pay.png"
/></td><td><img alt="VISA" title="VISA"
src="fileadmin/images/tankstellenfinder/karten/visa.png"
/></td></tr><tr><td><img alt="Diners" title="Diners"
src="fileadmin/images/tankstellenfinder/karten/diners.png"
/></td><td><img alt="UTA" title="UTA"
src="fileadmin/images/tankstellenfinder/karten/uta.png"
/></td></tr><tr><td><img alt="DKV" title="DKV"
src="fileadmin/images/tankstellenfinder/karten/dkv.png" /></td><td><img
alt="Novo Fleet" title="Novo Fleet"
src="fileadmin/images/tankstellenfinder/karten/novo_fleet.png"
/></td></tr><tr><td><img alt="Open Drive" title="Open Drive"
src="fileadmin/images/tankstellenfinder/karten/open_drive.png"
/></td></tr></table></td></tr></table><hr /><table
class='tsdetail2'><tr><td id='tsdetail_td_preise'><h1>Aktuelle
Tankstellenpreise</h1><table><tr><td><table class='tf_tbl_price'><tr><td
class='td_tf_tbl_pricename'><table class='tf_tbl_pricename'><tr><td
class='tf_td_pricename' style='white-space:
nowrap;'>Diesel</td></tr></table></td><td
class='td_tf_tbl_pricevalue'><table class='tf_tbl_pricevalue'><tr><td
class='tf_td_pricevalue tf_price_big'><img
src='fileadmin/images/tankstellenfinder/zahlen/1.png'alt=''></td><td
class='tf_td_pricevalue tf_price_big'><img
src='fileadmin/images/tankstellenfinder/zahlen/2.png'alt=''></td><td
class='tf_td_pricevalue tf_price_big'><img
src='fileadmin/images/tankstellenfinder/zahlen/9.png'alt=''></td><td
class='tf_td_pricevalue tf_price_small'><img
src='fileadmin/images/tankstellenfinder/zahlen/9.png'alt=''></td></tr></table></td></tr></table></td><td><table
class='tf_tbl_price'><tr><td class='td_tf_tbl_pricename'><table
class='tf_tbl_pricename'><tr><td class='tf_td_pricename'
style='white-space: nowrap;'>Super&nbsp;E10</td></tr></table></td><td
class='td_tf_tbl_pricevalue'><table class='tf_tbl_pricevalue'><tr><td
class='tf_td_pricevalue tf_price_big'><img
src='fileadmin/images/tankstellenfinder/zahlen/1.png'alt=''></td><td
class='tf_td_pricevalue tf_price_big'><img
src='fileadmin/images/tankstellenfinder/zahlen/4.png'alt=''></td><td
class='tf_td_pricevalue tf_price_big'><img
src='fileadmin/images/tankstellenfinder/zahlen/7.png'alt=''></td><td
class='tf_td_pricevalue tf_price_small'><img
src='fileadmin/images/tankstellenfinder/zahlen/9.png'alt=''></td></tr></table></td></tr></table></td></tr><tr><td><table
class='tf_tbl_price'><tr><td class='td_tf_tbl_pricename'><table
class='tf_tbl_pricename'><tr><td class='tf_td_pricename'
style='white-space: nowrap;'>Super</td></tr></table></td><td
class='td_tf_tbl_pricevalue'><table class='tf_tbl_pricevalue'><tr><td
class='tf_td_pricevalue tf_price_big'><img
src='fileadmin/images/tankstellenfinder/zahlen/1.png'alt=''></td><td
class='tf_td_pricevalue tf_price_big'><img
src='fileadmin/images/tankstellenfinder/zahlen/5.png'alt=''></td><td
class='tf_td_pricevalue tf_price_big'><img
src='fileadmin/images/tankstellenfinder/zahlen/1.png'alt=''></td><td
class='tf_td_pricevalue tf_price_small'><img
src='fileadmin/images/tankstellenfinder/zahlen/9.png'alt=''></td></tr></table></td></tr></table></td><td><table
class="tf_tbl_price" style="width: 100%; height: 100%;"><tr><td
class="td_tf_tbl_pricename"><table
class="tf_tbl_pricename"><tbody><tr><td
class="tf_td_pricename">&nbsp;</td></tr></tbody></table></td><td
class="td_tf_tbl_pricevalue"><table
class="tf_tbl_pricevalue"><tbody><tr><td class="tf_td_pricevalue
tf_price_big"><img src="fileadmin/images/tankstellenfinder/space.gif"
alt=""></td><td class="tf_td_pricevalue tf_price_big"><img
src="fileadmin/images/tankstellenfinder/space.gif" alt=""></td><td
class="tf_td_pricevalue tf_price_big"><img
src="fileadmin/images/tankstellenfinder/space.gif" alt=""></td><td
class="tf_td_pricevalue tf_price_small"><img
src="fileadmin/images/tankstellenfinder/space.gif"
alt=""></td></tr></tbody></table></td></tr></table></td></tr><tr><td
class='price_disclaimer' colspan='2'>(Stand: 24.05.2014 13:46)<br
/>Verbindlich sind die Preise an der Zapfsàule</td></tr></table></td><td
id='tsdetail_td_service'><h1>Unsere
Serviceangebote</h1><ul><li>STAR-Shop</li><li>Back-Service</li><li>Waschanlage</li></ul></td></tr></table><hr
/>
</div>

<!-- END: Content of extension "user_astfinder", plugin
"user_astfinder_pi1" -->


<!-- Plugin inserted: [end] -->

<!-- CONTENT ELEMENT, uid:177/list [end] -->

</div><!-- colcontent -->
<div class="bookmarks"><br /><hr /><div
linkto="http://www.star-tankstellen.de/tank...html"
class="socialsharer"></div></div>
</div>
</div>

<div id="mystar">
<!--###MYSTARLOGO### begin --><div id="mystarlogo"><img alt=""
src="/fileadmin/images/ci/mystartop_OHNE_261b180h.jpg" width="100%"
height="100%" /></div><!--###MYSTARLOGO### end -->
<!--###WATCHLIST### begin -->
<div id="watchlist">
<a href="index.php?id„"><div id="watchlistheader"><div
class="mystar_headline"><img alt=""
src="/fileadmin/images/ci/my_watchlist.png" width="100" height="26" /></div>
<div class="mystar_arrow"><img alt=""
src="/fileadmin/images/ci/pfeil.png" width="17" height="17" /></div>
</div></a>
<p>Schnell mal vergleichen:<br />Beobachten Sie die
Kraftstoffpreise von bis zu drei star Lieblingstankstellen gleichzeitig.</p>
</div>
<!--###WATCHLIST### end -->
<div class="bottomshadow"></div>
<!-- BEGIN iPhone -->
<!--
<div id="myiphone">
<a href='index.php?id1' class="trackClick itemAppSidebar"><div
id="myiphoneheader"><div class="mystar_headline"><img alt=""
src="/fileadmin/images/ci/mystariphone.png" width="179" height="26" /></div>
<div class="mystar_arrow"><img alt=""
src="/fileadmin/images/ci/pfeil.png" width="17"
height="17"/></div></div></a>
<a href='index.php?id1' class="trackClick itemAppSidebar"><img
alt="" src="/fileadmin/ToGo/mystarToGo.jpg" width="100%" /></a>
<p id="schweb"><a href='index.php?id1'>F&uuml;hrt Sie direkt zu
Ihrer Tankstelle.</a></p>
</div>
<div class="bottomshadow"></div>
#################################################################### -->

Jochen

Am 26.05.2014 15:24, schrieb Rolf Muth:
Hallo Joachim Hartman,

Am Montag, 26. Mai 2014 14:25 schrieb Joachim Hartman:
in einem bash-Script möchte mit der Zeilen

URL="http://www.star-tankstellen.de/tank...inder.html
?user_astfinder_pi1[tsid]="$1 merker=?????????????????????
preise=$(wget -q -O - $URL | grep -m 1 $merker)


Gib doch mal ein Beispiel für die zu durchsuchende Datei...






Zum AUSTRAGEN schicken Sie eine Mail an
mit dem Subject "unsubscribe". Probleme? Mail an (engl)
Archive: https://lists.debian.org/

Ähnliche fragen