[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: passing xterm parameters



At Tuesday, 03 February 2004, Kenneth Macdonald Karlsen <ken@fiona-
victor.com> wrote:

>rthoreau@iwon.com wrote:
>
>>On Tue, Feb 03, 2004 at 12:52:26PM -0500, Harland Christofferson 
wrote:
>>  
>>
>>>i have several lynx sessions that are being piped to text files, 
>>>i.e., lynx www.somewebpage.com > temp.txt. in order to capture the 
>>>entire web page, i have found that i have to run this from an xterm 
>>>session w/ the window opened to at least the row/column width of 
>>>the web page of interest. i wish to have these lynx sessions run 
>>>as a cron job without having to open an xterm session. i am sure 
>>>there are environment variables set for the number of rows and 
colunms 
>>>in the xterm session that are passed to lynx when lynx is called 
>>>from the xterm command line. how can i pass these parameters to lynx 
>>>such that the script can be started via a cron job and never have 
>>>to have an xterm session open?
>>>    
>>>
>>


my issue is not whether to use lynx or wget. it is fundamental to 
passing bash shell variables from the parent script to the child 
script. 

in my parent script, i have tried:

COLUMNS=163
LINES=80
export COLUMNS
export LINES
my_child_script.sh


the variables, i have to assume, are being set and exported to the 
child (my_child_script.sh) because i can echo them and see them set 
when i use the #!/bin/sh -x option in the child script. However, 
when using an xterm or cron job to initiate the parent script, there 
must be something occuring that tells the child row and column information 
that superceeds the COLUMNS and LINES variables. I know this because 
i can see the output of my_child_script being truncated. to prevent 
this i have to open an xterm on my desktop then i drag to the appropriate 
size w/ my mouse then i initiate the script on the command line.











Reply to: