my first shell script

I have a new job, which involves working on an AIX box over SSH. It the first time I’ve used command line to do everything I do in a day and its an education – especially as I’m new to korn shell.

Today I wrote my first shell script, it sets the title of my putty window so I don’t get confused which window is which. Here it is:


echo "\033]0;$PWD\007";
if test -n $1
then
        echo "\033]0;$1\007";
fi

Leave a Reply

Please use [code] and [/code] around any source code you wish to share.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)