Operating System - HP-UX
1847156 Members
5845 Online
110263 Solutions
New Discussion

Re: command 'script' changes /etc/profile

 
John Payne_2
Honored Contributor

command 'script' changes /etc/profile

I have 10 out of 50 machines that when I issue the command 'script', my PS1 settings are changed. On the other machines, I do not get this, my PS1 and other vars remain the same.

Has anyone seen this? I am at the same patch level across these machines. (Unless something really funny has happened while I wasn't watching...)

This wouldn't necessarily be a problem, but I must not have enough to do if I am making more work for myself...

Thanks

John
Spoon!!!!
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: command 'script' changes /etc/profile

The script command is supposed to put the current screen content into a file.

It is not according to my tests an the man page supposed to change PS1. It did not do this on two systems.

Your results are quite interesting.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor

Re: command 'script' changes /etc/profile

John,

What about an alias for script, or a script named script that is being picked up first in your path?


Pete


Pete
John Payne_2
Honored Contributor

Re: command 'script' changes /etc/profile

No, we appear to be using the same 'script' command, and it is not wrappered or anything.

John
Spoon!!!!
John Payne_2
Honored Contributor

Re: command 'script' changes /etc/profile

(I had already looked at that Pete..)

At this point, I assume I will have to open a call to HP, unless someone comes up with something for me in the next day. (It's mostly only bugging me.)

Thanks

John
Spoon!!!!
Pete Randall
Outstanding Contributor

Re: command 'script' changes /etc/profile

John,

I kind of figured that would have occurred to you, but thought I should mention it just in case. I'm still scratching my head over this and will respond if anything occurs to me.

Good luck,


Pete


Pete
John Payne_2
Honored Contributor

Re: command 'script' changes /etc/profile

This is fixed now. I opened an issue, and I would like to thank Cheryl Griffin for pointing me in the right direction.

On most of my machines, I have the following in /etc/profile:

export PS1="$HOST:\$PWD$ "

On the 10 that were not working, this is not present. (For some reason.) This made these commands change PS1, no matter what I had in my .profile for a PS1 export.

Thanks

John
Spoon!!!!
John Payne_2
Honored Contributor

Re: command 'script' changes /etc/profile

(I guess I should have thought of that...)

John
Spoon!!!!