Converting an OpenVms .com to a UNIX ksh script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Converting an OpenVms .com to a UNIX ksh script
# 1  
Old 05-23-2002
Converting an OpenVms .com to a UNIX ksh script

Does anyone know what a unix equivalent to the following OpenVms string would be?

variable1 = F$FAO("!123AS",file_create_time)

I can't seem to find the proper syntax of anything I try.

Thx!

J
# 2  
Old 05-23-2002
It's been awhile since I played with DCL so would you mind showing an example of $ dir/full and the output of the F$FAO command on the same file?

It may be that you will have to use something more than (ksh, csh, sh, bash... by the way, what are you using?) to get the info you want if you can get it at all. Perl may be an option.

You can check the man page on ls - you should find 'ls -l' gives you something of what you want

ls -l (the long list) prints its output as follows for the
POSIX locale:

-rwxrwxrwx+ 1 smith dev 10876 May 16 9:42 part2

Piping that to your favorite Maxicut 9000 (it slices, it dices, it makes julian fries) such as awk or cut (see man page on awk and cut) will then get the date and time.

$ ls -l myfile | awk '{print $6 $7 $8}'
May 16 9:42
$

If this doesn't help then post the output of dir/full and f$fao.
thehoghunter
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Converting xls file to xlsx on UNIX script / command line.

Hi All, Am needing advise on how to convert xls file to xlsx format on Solaris unix command line or scripting. I tried searching online but it looks like I need to either use Perl packages of Excel or Python packages or some other 3rd party tool. Problem is to install any of these will require... (2 Replies)
Discussion started by: arvindshukla81
2 Replies

2. Shell Programming and Scripting

converting ksh to bash - typeset commands

Hi all, Am trying to convert a script written in ksh to a bash shell. At the moment, am stumped with the typeset -u command and I can't find an equivalent of it in bash. integer function is also not working as is the following if statement if ] && ]; then continue fi Is... (3 Replies)
Discussion started by: newbie_01
3 Replies

3. Shell Programming and Scripting

Unix shell script converting temperatures.

:confused:Please I really need help with an assignment question. I need to write a script that will take the input from a file and convert the number from Centigrade(Celcius) to Fahrenheit or vice versa. Thank you so much. I really need it to be detailed. Please remember the input comes from a file. (1 Reply)
Discussion started by: starter101
1 Replies

4. Shell Programming and Scripting

HELP WITH .ksh script converting the exit status

Hi Can someone help me please? In a standard UNIX .ksh script, if you have the exit status..say 5...what line do you have to enter into the script for this number to be automatically converted to its actual exit reason by looking up the exit status file...wherever that is? thanks angus (1 Reply)
Discussion started by: angusyoung
1 Replies

5. Shell Programming and Scripting

converting the data type in unix shell script

I am writing a unix shell script that will extract records from table and write into a file. ====================================== #! /bin/ksh ############################ # AFI Monitor Script ############################ . /db2/uszlad48/sqllib/db2profile export... (5 Replies)
Discussion started by: kmanivan82
5 Replies

6. Shell Programming and Scripting

converting ksh scripts to sh

Hello All, I have a whole bunch of shell scripts written in a ksh environment and which successfully execute there. However, I found out that they eventually need to be used in a sh environment. So some commands like some_variable=$(some_command) fail because sh doesn't understand $(.....). I... (11 Replies)
Discussion started by: sherkaner
11 Replies

7. Windows & DOS: Issues & Discussions

converting ksh scripts--.bat in window's

hi evry one , I did some ksh scripts for file editing in AIX 5.2 ver, issue is while I was trying to run these scripts in windows box as batch files windows is not recognising the awk part of the ksh script,as it is GNU environment, so any one who can help me will be appreciated. this is the... (3 Replies)
Discussion started by: 2.5lt V8
3 Replies

8. Shell Programming and Scripting

unix script for converting a decimal to binary

Could anybody please help me in writing a script in unix for converting a decimal number to binary number. (3 Replies)
Discussion started by: softy
3 Replies

9. Programming

Porting File from OPenVMS to AIX Unix

We are in requirement to port relative file organization files from OpenVMS V7.1-1H2 to AIX Unix. These file contains multiple binary records each of 512 bytes but it could be possible that a few bytes are padded up to fill the record structure. One of our thought process is to write a program... (1 Reply)
Discussion started by: S.P.Prasad
1 Replies
Login or Register to Ask a Question