17 lines
		
	
	
		
			770 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			770 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
#! /bin/sh
 | 
						|
 | 
						|
# Description:            Get a quot from http://danstonchat.com
 | 
						|
 | 
						|
lynx --dump --display_charset=utf8 http://danstonchat.com/random.html | awk '$1~"commentaires" && $0!~"RSS" { getline; while ($1!~"#") { print $0; getline;}; exit}'
 | 
						|
 | 
						|
#awk                     : chope les lignes où…
 | 
						|
#$1~"#"                  : le premier terme ($1) contient un dièse
 | 
						|
#&&                      :                        ET
 | 
						|
#$0!~"RSS"               : la ligne entière ($0) ne contient pas RSS
 | 
						|
#{                       : fait…
 | 
						|
#getline;                : chope la ligne suivante
 | 
						|
#while ($1!~"#")         : tant que le premier terme ne contient pas de dièse…
 | 
						|
#{ print $0; getline;};  : affiche la ligne entière
 | 
						|
#exit                    : quitte (on veut une seule quote)
 | 
						|
#}
 |