resize | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

resize

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 05-10-2011
drbiloukos drbiloukos is offline
Registered User
 
Join Date: Sep 2010
Last Activity: 10 January 2013, 3:28 AM EST
Posts: 99
Thanks: 69
Thanked 0 Times in 0 Posts
resize

Hello,

I created a script that runs perfectly on 2 different account but I it will not run in 2 others (HP-UX). I noticed that the problem is caused by the resize command in the .profile of the problematic accounts. Since it is a prod server, I dont want to remove it witout knowing what it is being used for.

Can somebody briefly explain what resize is used for?

P.S: I 've read the man.

Thank you in advance.
Sponsored Links
    #2  
Old 05-10-2011
bartus11's Avatar
bartus11 bartus11 is offline Forum Staff  
Moderator
 
Join Date: Apr 2009
Last Activity: 23 September 2014, 12:55 AM EDT
Posts: 3,710
Thanks: 7
Thanked 1,142 Times in 1,113 Posts
It resized the terminal to the size of your current window. It is useful when you connect to the server's console, in which case without using it, effective usage area would be limited, even if you had space in your window. If you want to see example of that command working, try this:

Code:
$ stty cols 80
$ stty rows 25
$ top 
(exit top)
$ resize
$ top

The Following User Says Thank You to bartus11 For This Useful Post:
drbiloukos (05-10-2011)
Sponsored Links
    #3  
Old 05-10-2011
drbiloukos drbiloukos is offline
Registered User
 
Join Date: Sep 2010
Last Activity: 10 January 2013, 3:28 AM EST
Posts: 99
Thanks: 69
Thanked 0 Times in 0 Posts
So most likely it will not affect any cron jobs script. Just visual impact, if applicable ?
    #4  
Old 05-10-2011
pludi's Avatar
pludi pludi is offline Forum Advisor  
Cat herder
 
Join Date: Dec 2008
Last Activity: 28 March 2014, 8:35 AM EDT
Location: Vienna, Austria, Earth
Posts: 5,522
Thanks: 38
Thanked 335 Times in 308 Posts
Nothing in the .profile will impact a cron job in any way, since it's not automatically sourced, as opposed to an interactive shell. Better check if all paths to applications are correct, since cron won't know about any changes to the PATH variable.
The Following User Says Thank You to pludi For This Useful Post:
drbiloukos (05-10-2011)
Sponsored Links
    #5  
Old 05-11-2011
drbiloukos drbiloukos is offline
Registered User
 
Join Date: Sep 2010
Last Activity: 10 January 2013, 3:28 AM EST
Posts: 99
Thanks: 69
Thanked 0 Times in 0 Posts
Part of my script

Code:
#!/bin/sh

(echo open 10.246.224.61
sleep 2
echo user
sleep 2
echo pass
sleep 2
echo exit) | telnet

resize on my .profile will actually prevent the exit command to exit telnet:
esize: unknown character, exiting.
It will not close the connection
If I remove resize it works OK.

Any way to overcome this without removing resize ?
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Dynamic LUN resize apra143 AIX 3 06-04-2009 04:30 PM
how to resize a file dvas83 Filesystems, Disks and Memory 3 04-24-2009 11:19 AM
resize filesystems mhbd UNIX for Advanced & Expert Users 1 01-25-2008 04:16 AM
resize /var/www (debian) seagonus UNIX for Advanced & Expert Users 3 12-17-2007 07:36 AM
resize fs lo-lp-kl AIX 1 09-20-2007 12:35 PM



All times are GMT -4. The time now is 06:18 PM.