Sponsored Content
Full Discussion: Help with Kornshell Script
Top Forums Shell Programming and Scripting Help with Kornshell Script Post 302319983 by JerryHone on Tuesday 26th of May 2009 06:21:24 PM
Old 05-26-2009
Code:
cd $InputDirectory
for file in *_original.shp
do
    base=`basename $file _original.shp`
    if [ -e  ${base}_Update.shp ] 
    then
        *runs translation
    fi
done

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Kornshell 93

I've been asked to upgrade from Kornshell 88 to Kornshell 93 on a Solaris 7 box. Since my experience with Unix is limited can anyone point me in the right direction? Specifically, where can I get the files that I need to do the upgrade? Thanks. (1 Reply)
Discussion started by: Ask Me
1 Replies

2. UNIX for Advanced & Expert Users

mailx in kornshell script passing return code to CA-Unicenter

I have a KornShell script that has successfully been scheduled through Cron. We are in the process of changing over from Cron to using CA-Unicenter. To negative test the script I put a bad return code in. At the bottom of the script an e-mail is sent using mailx and then the return code is set... (1 Reply)
Discussion started by: Connie
1 Replies

3. Programming

Kornshell convdate

Hello, I'm currently doing some programming using the Kornshell environment. I have just been on a Unix course where our instructor gave us some coding examples. I am using one of these examples to solve a few problems. However, the code examples use a function called 'convdate' to convert a... (10 Replies)
Discussion started by: nezster
10 Replies

4. Shell Programming and Scripting

Need Help with KornShell script

I need a KornShell script that will, among all the users currently logged on to the system, find a slot of one hour that contains the most number of users. I know how to list all the users currently logged on but how do I do anything with the times that are listed? Please help, thanks. (1 Reply)
Discussion started by: ckrieger1
1 Replies

5. Shell Programming and Scripting

help with Kornshell function

I am trying to write a Kornshell function that takes a string parameter which represents a filename or directory name. The function checks to see if there are any spaces in the filename or directory name and then replaces the spaces with an underscore. The returned value is a filename or directory... (1 Reply)
Discussion started by: ckrieger1
1 Replies

6. Shell Programming and Scripting

How to make a script (Bash, KornShell, etc.) executable by mouse clicking?

Hello everybody, Is there any way to make a script (Bash, KornShell, etc.) executable by mouse clicking? For example you have a file myscript.sh, you run: $ chmod u+x myscript.sh Therefore it becomes executable and all you need is to run from the terminal: $./myscript.sh... (2 Replies)
Discussion started by: dariyoosh
2 Replies

7. Shell Programming and Scripting

write a perl script or kornshell reading a two files and outputting to comma format

Hello Can someone help me to write a perl script or kornshell reading a two files and outputting to comma format. Here is the two files listofdisks.txt id, diskname, diskgroup, diskisze(GB), FC 1, CN34, GRP1, 30, FC_CN34 2, CN67, GRP5, 19, 4, VD1, GRP4, 23, FC_VD1 6, CF_D1, ... (0 Replies)
Discussion started by: deiow
0 Replies

8. Shell Programming and Scripting

Kornshell grabbing value from file

I have a script right now that I run a command which outputs just one word to a file. Well I need to grab that value and use it in another line of code so... touch oraclesid.txt echo $ORACLE_SID > oraclesid.txt #grab that value sqlplus v500/v500@<value> how do I grab that value from the... (6 Replies)
Discussion started by: Blogger11
6 Replies

9. Shell Programming and Scripting

Kornshell Using a variable in a command

So Here is my code cd $cer_mgr table='hostname' environment='echo $environment' cat mq_$table_$environment_startup.ksh I'm trying to make the results of the command "hostname" into a variable so that i can use it in my cat command. Well what I have is not working. So how do I use that... (1 Reply)
Discussion started by: Blogger11
1 Replies

10. Shell Programming and Scripting

[KornShell]: Why getopts doesn't detect disabled switches in this script?

Hi, My environement OS: Linux Fedora Core 17 X86_64 KSH version: sh (AT&T Research) 93u+ 2012-08-01 As I understand inside a Kornshell script, the getopts statement allows to collect information about the switches provided for the script (if any). Besides, it is possible to... (3 Replies)
Discussion started by: dariyoosh
3 Replies
DTK_CREATE_RECTANGLE_2P(3)					Draw Toolkit manual					DTK_CREATE_RECTANGLE_2P(3)

NAME
dtk_create_triangle_2p, dtk_create_rectangle_hw - Create and modify rectangular shapes SYNOPSIS
#include <drawtk.h> dtk_hshape dtk_create_rectangle_2p(dtk_hshape shp, float p1_x, float p1_y, float p2_x, float p2_y, int filled, const float *color); dtk_hshape dtk_create_rectangle_hw(dtk_hshape shp, float cx, float cy, float h, float w, int filled, const float *color); DESCRIPTION
dtk_create_rectangle_2p() creates a rectangle whose the opposing corners are located at (p1_x,p1_y) and (p2_x,p2_y). dtk_create_rectangle_hw() creates a rectangle with height h and width w and with its center located at (cx,cy) in the original frame. shp, filled and color have the same usage and meaning as for other shape creation function: * shp can be used to modify a previously created shape. If it is non-null, the handle will be used to modify the shape referenced by shp: no new shape is created and the returned value is ensured to be shp in case of success, NULL otherwise. If shp is NULL, the function will attempt to create a new shape. * filled is set to 0 if the described shape should be a continuous line or a non-null value if the shape is supposed to be filled polygon. * color should point to a 4 float array containing a normalized RGBA value (i.e. each component is between 0.0 and 1.0). RETURN VALUE
In case of success these functions return the handle to the newly created or modified shape. If the shp argument is non-null, the handle returned is the same value. In case of error, NULL is returned. SEE ALSO
dtk_destroy_shape(3) EPFL
2011 DTK_CREATE_RECTANGLE_2P(3)
All times are GMT -4. The time now is 06:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy