Kornshell convdate


 
Thread Tools Search this Thread
Top Forums Programming Kornshell convdate
# 8  
Old 12-30-2003
Post the exact command that you are using to compile the code. Post the exact text of any results that you get.


I don't have access to an AIX system. But I've tried that code with 4 compilers on two different OS's and I can't get it to fail.

Your include file would seem to be:
#include <unistd.h>
But's that the case on HP-UX too. HP-UX compiles it because the other include files seem to bring it in. I also did not need to add an include file on SunOS.

You might give that a try though. Look at the the top of the program. Right after the comment comes the include files. There are three lines that start out "#include". You need to add a fourth line.

But I'm thinking that you have some other problem.
# 9  
Old 12-30-2003
Kornshell convdate

Hmmmm, this is where my newbie Unix experience begins to show. Sorry about this. I thought I could copy the code from the internet, use vi to create a file called convdate, paste in the code and change the file properties to become executable. This file will be in the same directory as the script that I'm running.

I guess this is very wrong. Any advise would be welcome.
# 10  
Old 12-30-2003
Very wrong would be an understatement. I don't know AIX so I can't help you keystroke by keystroke. But in general you need to copy the code from the internet and create a file called convdate.c. Then you need to to compile that into an executable. Maybe your compiler is called "cc" and maybe it's on your PATH. Try this:

cc convdate.c -o convdate

If that works, great! Otherwise, you will need to find an AIX expert.
# 11  
Old 12-30-2003
Kornshell convdate

Thanks for the advice. Had a feeling I was way off track.

Think the code you gave me would work. Tried typing cc and got the message that I don't have execute permissions.

Think I might be out of my league now. I am only a standard user on the system. However, being a VB programmer with a very weekly manual process I thought I could automate it. Went on a Unix course before christmas and it looked quite straightforward. Little did I know our version of Unix wouldn't have convdate nor does it have a personal cron file. I very much doubt I'll have access to the system cron so I might just give up. Good bit of tinkering whilst the office is quiet over the christmas period.

Looks like I won't be able to compile the convdate function code. Think I might just give up.

Sound good to you? Feel free to convince me otherwise! Beginning to feel that my VB is much much easier!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[SOLVED] String length in kornshell

In the kornshell you can get the length of a string with $ x=abc $ print ${#x} 3 If the current locale is a multibyte locale, like de_AT.UTF-8, you get the length of the string in bytes, not characters: $ x=für $ print ${#x} 4 Is there an easy way to get the length of a... (8 Replies)
Discussion started by: hergp
8 Replies

2. Shell Programming and Scripting

Kornshell finding operating system

This should be really simple but I can't figure it out. :wall: Whats the command to find the operating system version thats running. I need to know if the node my script gets run on is HP-UX or linux or AIX or Oracle (6 Replies)
Discussion started by: Blogger11
6 Replies

3. 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

4. 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

5. Shell Programming and Scripting

Execution problem on kornshell

HI, Requirement: I need to pass space between argument value for the paramter "GPG_PUBLIC_UID" but whenever i use single quotes or double quotes while supplying value for the arguments to the script, i see the value of the field "GPG_PUBLIC_UID" is getting splitted and my script fails to... (6 Replies)
Discussion started by: reachaysh
6 Replies

6. Shell Programming and Scripting

Help with Kornshell Script

Hi, I'm a novice at programming and need some help with a kornshell script I've been writting. I have an inputdirectory with all my .shp files. In my input directory the shapefiles are named XXXX_original.shp, XXXX_UPDATE.shp ect. In my .ksh script I have created a for loop which... (2 Replies)
Discussion started by: beery
2 Replies

7. UNIX for Dummies Questions & Answers

[kornshell] Getting the next weekday date

Hi All can anyone help me with this, Im new to kornshell scripting and is trying to get the next weekday to a variable: strDate=%date '+%Y%m%d' // YYYYMMDD strNewDate= :confused: // assuming that current date is 20050812 (friday) then strNewDate will get 20050815 (monday) or if... (1 Reply)
Discussion started by: rs_f01
1 Replies

8. 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

9. 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

10. 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
Login or Register to Ask a Question