Computing.Net > Forums > Unix > How to write a korn shell script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to write a korn shell script

Reply to Message Icon

Name: AIXBEGINNER
Date: August 13, 2002 at 02:08:53 Pacific
Comment:

Hi,

I'm a beginner script user. It there any shell script example where I could reference on how to check a file in a directory is there before overwrite it in unix AIX 4.3.3.

Reg
Aixbeginner



Sponsored Link
Ads by Google

Response Number 1
Name: Frank
Date: August 13, 2002 at 02:41:29 Pacific
Reply:

Hi tom,

use the test command also knowen as [].
This is the reason why you should never name a script test.

e.g. your script looks like following

filename="/u/a1xrdb1/filewo"
if [ -f ${filename} ]
then
echo "Datei schon da " 1>&2
else
echo "Datei noch nicht da"
fi


No RISK no fun
Frank


0

Response Number 2
Name: Ifthekhar Javed
Date: September 2, 2002 at 01:07:37 Pacific
Reply:

I want to write script file one application generating one logile and everyday this file becomes too big .So i would like write a script to generate new logfile by date wise.I will be thankfull to you if you can guide me.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


extend /usr on AIX Mail configuration



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: How to write a korn shell script

How to write a Korn script to searc www.computing.net/answers/unix/how-to-write-a-korn-script-to-searc/3817.html

sftp Korn shell script www.computing.net/answers/unix/sftp-korn-shell-script/4741.html

korn shell help www.computing.net/answers/unix/korn-shell-help/7834.html