Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [inne]Jak zrobić formatowanie tekstu w skrypcie bash?
Saki
post 11.07.2011, 18:33:43
Post #1





Grupa: Zarejestrowani
Postów: 240
Pomógł: 2
Dołączył: 5.12.2010
Skąd: Fulda

Ostrzeżenie: (0%)
-----


Witam, chce napisać mały skrypt do pobierania informacji o funkcji z strony php.net
Mam już bardzo prosty skrypt:

  1.  
  2. #!/bin/sh
  3. url=`lynx --dump http://$1.php.net/$2`
  4. echo $url




odpala się go w sposób sebastian@pc:~$ phpinfo pl echo
ładnie działa ale formatowanie tekstu brak, wiecie może jak zrobić aby ładnie pokazywał tekst?
Bo teraz wyświetla wszystko w jednej linii smile.gif


--------------------
Moje serwisy: services.itunix.eu | spytajsie.com

Server: Debian; Desktop: Mac Mini 10.8.1, ArchLinux XFCE
Go to the top of the page
+Quote Post
muk4
post 11.07.2011, 19:34:10
Post #2





Grupa: Zarejestrowani
Postów: 309
Pomógł: 56
Dołączył: 3.11.2006
Skąd: Gliwice

Ostrzeżenie: (0%)
-----


Albo sam formatuj tekst, albo zamiast -dump użyj -source i zamień <br /> na \n.

Ten post edytował muk4 11.07.2011, 19:34:34
Go to the top of the page
+Quote Post
Saki
post 11.07.2011, 21:54:17
Post #3





Grupa: Zarejestrowani
Postów: 240
Pomógł: 2
Dołączył: 5.12.2010
Skąd: Fulda

Ostrzeżenie: (0%)
-----


Cytat(muk4 @ 11.07.2011, 20:34:10 ) *
Albo sam formatuj tekst, albo zamiast -dump użyj -source i zamień <br /> na \n.



Ale, ale jak zmiennie na source to pokazuje mi cały kod źródłowy

sebastian@pc:/tmp$ phpinfo pl echo
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head profile="http://purl.org/NET/erdf/profile"> <title>PHP: echo - Manual</title> <style type="text/css" media="all"> @import url("/styles/site.css"); @import url("/styles/mirror.css"); </style> <!--[if IE]><![if gte IE 6]><![endif]--> <style type="text/css" media="print"> @import url("/styles/print.css"); </style> <!--[if IE]><![endif]><![endif]--> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="shortcut icon" href="/favicon.ico" /> <link rel="contents" href="index.php" /> <link rel="index" href="ref.strings.php" /> <link rel="prev" href="function.crypt.php" /> <link rel="next" href="function.explode.php" /> <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /> <link rel="schema.rdfs" href="http://www.w3.org/2000/01/rdf-schema#" /> <link rev="canonical" rel="self alternate shorter shorturl shortlink" href="http://php.net/echo" /> <link rel="license" href="http://creativecommons.org/licenses/by/3.0/" about="#content" /> <link rel="canonical" href="http://php.net/manual/en/function.echo.php" /> <script type="text/javascript" src="/userprefs.js"></script> <base href="http://pl.php.net/manual/en/function.echo.php" /> <meta http-equiv="Content-language" content="en" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs


--------------------
Moje serwisy: services.itunix.eu | spytajsie.com

Server: Debian; Desktop: Mac Mini 10.8.1, ArchLinux XFCE
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 18.07.2025 - 08:39