Sponsored Content
Full Discussion: Remove text in line
Top Forums UNIX for Dummies Questions & Answers Remove text in line Post 302488978 by limadario on Wednesday 19th of January 2011 05:32:12 AM
Old 01-19-2011
My html file is:
Code:
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Posicionamento por Ponto Preciso (PPP) - IBGE</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META name="dc.title" content="CGED/IBGE">
<META name="description" content="&nbsp;">
<META name="keywords" content="&nbsp;">
<META name="dc.language" scheme="ISO639-2" content="eng">
<META name="dc.creator" content="Instituto Brasileiro de Geografia Estat&iacute;stica">
<META name="dc.date.created" content="2002-03-20">
<META name="dc.date.modified" content="2005-03-29">
<META name="orgid" content="916; 229">
</HEAD>
<link rel=stylesheet type="text/css" href="estilo.css">
<BODY>
<div class="externo">
<div id="planejamento">
<span>Minist&eacute;rio do Planejamento, Or&ccedil;amento e Gest&atilde;o</span>
<select name="options" id="select_planejamento" onChange="if(options[selectedIndex].value) window.location.href= (options[selectedIndex].value)">
<option>Destaques do governo</option>
<option value="javascript:nova_jan('http://www.brasil.gov.br')">Portal do Governo Federal</option>
<option value="javascript:nova_jan('http://www.e.gov.br')">Portal de Servi&ccedil;os do Governo</option>
<option value="javascript:nova_jan('http://www.radiobras.gov.br')">Portal da Ag&ecirc;ncia de Not&iacute;cias</option>
<option value="javascript:nova_jan('http://www.brasil.gov.br/emquestao')">Em Quest&atilde;o</option>
<option value="javascript:nova_jan('http://www.fomezero.gov.br')">Programa Fome Zero</option>
</select>
</div>
<div id="titulo">
<h3 id="ibge">Instituto Brasileiro de Geografia e Estat&iacute;stica</h3>
</div>
<div class="topo">
<a href="http://www.ibge.gov.br"><div class="logo"></div></a>
</div>
<div class="menu"></div>
<h2 id="titulo_interna" class="titulo_geo">Posicionamento Preciso por Ponto (PPP)</h2>
<div id="geral">
<!-- Abaixo, o PHP original -->

<p> <b> Arquivo CASC2270.09o transferido com sucesso. </b> </p><p> <b> Verificando CASC2270.09o ... </b> </p><p> <b> Iniciando processamento de CASC2270.09o ... </b> </p>
<p> <b> Arquivo processado corretamente. </b> </p>
<p> <a href=http://gps-ntrip.ibge.gov.br/processados/Sim_CASC2270.09o_20110118123430.zip> <b> Clique aqui para transferir o arquivo com os resultados. </b>  </a> </p>
<p> <b> O arquivo com os resultados foi enviado para Sim </b> </p>
<!-- Aqui termina o PHP original -->

</div>
<div id="rodape">
<ul>
<li id="home"><a href="http://www.ibge.gov.br">P&aacute;gina Inicial</a></li>
<li id="instituicao"><a href="http://www.ibge.gov.br/home/disseminacao/eventos/missao/default.shtm" target="_blank">A Institui&ccedil;&atilde;o</a></li>
<li id="atendimento"><a href="http://www.ibge.gov.br/home/disseminacao/locaisdeatendimento/default.shtm" target="_blank">Locais de Atendimento</a></li>
<li id="estatisticas_site"><a href="http://www.ibge.gov.br/home/disseminacao/online/estatisticas/2008/default.shtm" target="_blank">Estat&iacute;sticas do Site</a></li>
<li id="editais"><a href="http://www.comprasnet.gov.br/" target="_blank">Editais e Licita&ccedil;&otilde;es</a></li>
</ul>
</div>
</div>

<!-- Novo Script Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-285486-25");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- Fim do Novo Script Google Analytics -->

</BODY>
</HTML>

and i want to grep only the
Code:
http://gps-ntrip.ibge.gov.br/processados/Sim_CASC2270.09o_20110118123430.zip

so that i can use wget to download it from the page.
The problem is when i grep, it returns this:
Code:
<p> <a href=http://gps-ntrip.ibge.gov.br/processados/Sim_CASC2270.09o_20110118123430.zip> <b> Clique aqui para transferir o arquivo com os resultados. </b>  </a> </p>


Last edited by Franklin52; 01-19-2011 at 06:45 AM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to remove FIRST Line of huge text file on Solaris

i need help..!!!! i have one big text file estimate data file size 50 - 100GB with 70 Mega Rows. on OS SUN Solaris version 8 How i can remove first line of the text file. Please suggest me for solutions. Thank you very much in advance:) (5 Replies)
Discussion started by: madoatz
5 Replies

2. Shell Programming and Scripting

sed to remove 1st two characters every line of text file

what is the sed command to remove the first two characters of every line of a text file? each line of the text file has the same amount of characters, and they are ALL NUMERIC. there are hundreds of lines though. for example, >cat file1.txt 10081551 10081599 10082234 10082259 20081134... (20 Replies)
Discussion started by: ajp7701
20 Replies

3. UNIX Desktop Questions & Answers

How to remove text in each line after hyphen?

Hi, I'm trying to do something relatively simple. I have a txt file that has the following kinds of lines (and many more lines): CP19 Oahu - Maunawili Falls CP20 Oahu - Maunawili Falls AG12 Oahu - Maunawili Falls CP22 Oahu - Maunawili Falls, Local area AG14 Oahu CP141 KZ102 Kauai -... (7 Replies)
Discussion started by: euspilapteryx
7 Replies

4. Shell Programming and Scripting

remove specified line from text

hi, I wish to move a specified line from a text file: ltoremove=5 #remove 5th line i=1 while read line ; do if ; then ... i=$(($i+1)) done < "txt.txt" how should this actually be done? is there a shorter faster way to do this? :wall: Thanks, Ted (2 Replies)
Discussion started by: ted_chou12
2 Replies

5. Shell Programming and Scripting

how to remove all text including 2 certain character in each line!

Hi I have a file which has aroun 200 line and it is like this: GROUP2-WDI">GROUP2-WDI GROUP3-WDI">GROUP3-WDI KL2P0508BC">KL2P0508BC KL2P0508BIT">KL2P0508BIT KL3P0506BC">KL3P0506BC KL3P0506BUS">KL3P0506BUS KLD1F0507DBT">KLD1F0507DBT KLD1F0507DIT">KLD1F0507DIT KLD1F0510DBT">KLD1F0510DBT... (3 Replies)
Discussion started by: digitalmahdi
3 Replies

6. Shell Programming and Scripting

[Help] Remove text line containing *

Hi everybody, I have a perl script that I used to collect traceroute data from some site. It create output on the text file. The problem is , some site usually timed out when it's being tracerouted. And it show * * * on the line. Here is the example hop list to www.example.com 192.168.3.1... (3 Replies)
Discussion started by: franzramadhan
3 Replies

7. Shell Programming and Scripting

Script to remove line of text

Hello, I have a line that needs to be removed using sed -i to perform the replace in place. The issue that I have is the files on each server may contain extra rows after the last logger definition. So I can't count accurately from the last row. So from the example the line that contains... (8 Replies)
Discussion started by: jaysunn
8 Replies

8. Shell Programming and Scripting

How to remove blank line from a text file?

Hi All, I am creating a text file using perl. The first record I am writing as "$line" and all the other as "\n$line". At the end the file is having N number of lines. I am using this file for MLOAD (Teradata), which is reading N+1 lines in the file and failing.I am not able to find new line... (2 Replies)
Discussion started by: unankix
2 Replies

9. Shell Programming and Scripting

How Select numbers from a line of text, and remove leading spaces?

I have a text file with a line of text that contains numbers and text formatted into groups. I need to extract the number that can be either 1,2 or 3 digits long. Then write it to a variable, but i need to remove any leading spaces in the number first. I can get the numbers out but how to remove... (12 Replies)
Discussion started by: kcpoole
12 Replies

10. Shell Programming and Scripting

sed to remove partial text in one line only

I have test.xml XML file like <Report account="123456" start_time="2014-09-08T00:00:00+00:00" end_time="2014-09-10T23:59:59+00:00" user="Dollar Tree" limit="1000000" more_sessions="some text "> <Session ......rest of xml............... I need output like <Report> <Session ......rest of... (3 Replies)
Discussion started by: kumars1331@gmai
3 Replies
All times are GMT -4. The time now is 05:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy