| Autor | 
    Nachricht | 
   
  
    | 
      
     | 
    
      
        
					
            Titel: help with script file 
             Verfasst am: 14.06.2006, 02:33 Uhr
           | 
				 
       
     | 
   
  
    
      
        
          
             
             
  
            Anmeldung: 26. Okt 2005 
            Beiträge: 146 
            Wohnort: Out There 
            
            
           | 
         
       
     | 
    
      
        
          Hello. I have 2 very simple bash files. One gives you the 10 day forecast and the other gives you the current movie listings locally. Here are the 2 1-line scripts:
 
 
#!/bin/bash
 
## Check movies at Stonington Theater
 
clear
 
links -dump "http://movies.yahoo.com/showtimes/?z=02891#T1/print" |more
 
 
#!/bin/bash
 
##Weather report for westerly
 
clear
 
links -dump "http://www.weather.com/weather/print/02891"
 
 
These run in the Konsole and use the text browser "links" to display the data. The movie script lists movies for not one but about 6 or 7 local theaters. There is no way to have it display shows at just one theater cause they are all grouped together on the website. I would like to be able to get the script to find a line of text, and COLOR IT so I can spot it right away without having to scroll thru the list. I am not too clear on how to get the Konsole to display colors. I only need 1 row of text colored (any color). Is this possible? Is there some other code I can insert in the script I made to do this? If I can do this then I can play around with the weather script I made....any ideas??????? | 
         
        
          
          
            
          
             _________________ "Kanotix....what, me worry?!"
            
           | 
         
         
	        |     | 
	       
       
     | 
   
  
    | 
      
      
     | 
   
  
      | 
   
  
    | 
      
     | 
    
      
        
					
            Titel: help with script file 
             Verfasst am: 14.06.2006, 12:52 Uhr
           | 
				 
       
     | 
   
  
    
      
        
          
             
            
  
            Anmeldung: 09. Jan 2006 
            Beiträge: 1720 
             
            
            
           | 
         
       
     | 
    
      
        
          | on the console coloring is done with ESC-seq. | 
         
        
          | 
          
            
          
            
            
           | 
         
         
	        |     | 
	       
       
     | 
   
  
    | 
      
      
     | 
   
  
      | 
   
  
    | 
      
     | 
    
      
        
					
            Titel: help with script file 
             Verfasst am: 14.06.2006, 13:01 Uhr
           | 
				 
       
     | 
   
  
    
      
        
          
             
             
  
            Anmeldung: 18. Mar 2004 
            Beiträge: 3417 
             
            
            
           | 
         
       
     | 
    
      
     | 
   
  
    | 
      
      
     | 
   
  
      | 
   
  
    | 
      
     | 
    
      
        
					
            Titel: grep help? 
             Verfasst am: 19.06.2006, 14:40 Uhr
           | 
				 
       
     | 
   
  
    
      
        
          
             
             
  
            Anmeldung: 26. Okt 2005 
            Beiträge: 146 
            Wohnort: Out There 
            
            
           | 
         
       
     | 
    
      
        
          Well I have been closely reading the manpage for GREP but still cannot come up with a solution!  I would like to be able to use GREP but its a little daunting. 
 
 
wouldn't it be easier to pipe links' output to grep instead thus filtering your theatre of choice? Maybe using one of the context options (cf. "man grep")
 
 
I would like to be able to do this cause it is a much faster way to get info real quickly without waiting for web pages to load, or even waiting for browser to open. And I would be able to view exactly what I want! I read about greps ability to find a "pattern" in a body of text. The text I am trying to highlight on screen when links sends it, changes often when the movie theater changes its movie listings. The only reference point I have is at the beginning of each theater's listings, is the ADDRESS of the theater. So I am trying to use that address as a reference to start cause thats something that doesnt change, like movie titles over time. 
 
So when I run the script, when text appears I just look for the theaters address (the one I go to). I know this may sound stupid but I think it's a good way to learn some ofthe command line stuff I want to know.
 
When I need quick info like weather and movie listings, its quicker to use the Konsole with Links. The only major drawback is I cannot access my email (to send) with Links. It doesnt support ssl something or other....So I have been using PINE and its much faster than waiting for web based email. Anyway any more help would be appreciated!....thanks   | 
         
        
          
          
            
          
             _________________ "Kanotix....what, me worry?!"
            
           | 
         
         
	        |     | 
	       
       
     | 
   
  
    | 
      
      
     | 
   
  
      | 
   
  
    | 
      
     | 
    
      
        
					
            Titel: grep help? 
             Verfasst am: 19.06.2006, 19:32 Uhr
           | 
				 
       
     | 
   
  
    
      
        
          
             
            
  
            Anmeldung: 09. Jan 2006 
            Beiträge: 1720 
             
            
            
           | 
         
       
     | 
    
      
        
          normaly use: 
 
 
grep -f 'things to find' infile.
 
 
or
 
 
cat /filelocation/file | grep -f word | next program in row to handle the output fom grep
 
 
hope this 2 examples will help you a bit.  an pleas look at the diff how to handle one word or the whole pattern. | 
         
        
          | 
          
            
          
            
            
           | 
         
         
	        |     | 
	       
       
     | 
   
  
    | 
      
      
     | 
   
  
      | 
   
  
  
    | 
      
     | 
   
 
					 | 
				 
			 
		 |