Sponsored Content
Top Forums Shell Programming and Scripting converting from reliant 2 solaris Post 302273580 by abdulaziz on Monday 5th of January 2009 08:37:17 AM
Old 01-05-2009
converting from reliant 2 solaris

Hello...

I am trying to convert my script from one to another unix flavor...
from reliant to solaris...I did all but can not convert this awk/nawk:
First code if code that works what I want under reliant and the second should do same under solaris but it does not


I did so far from this :

Code:
awk  -vx=$deldate90 -vy=$deldate60 -vz=$unixdate ' 
        {ins = $4 $5 $6 
         expdate = $4 $5 $6 
                { if ( ins != "20010101" ) 
                     { if ( expdate < z ) 
                          {if ( expdate < x )
                              print $1","$2","$3"," $5"."$6"."$4",O"  > ("St"); 
                           if ( expdate >= x )
                              { if (expdate < y)
                                   print $1","$2","$3"," $5"."$6"."$4",D" > ("De")
                                if ( expdate >= y )  
                                   print $1","$2","$3"," $5"."$6"."$4",N" > ("In")}}
                       if ( expdate >= z && $4 != 2030) 
                           print $1","$2","$3"," $5"."$6"."$4",A" > ("Ak")}}} ' myfile


to this:

Code:
nawk -v x=$deldate90 -v w=$deldate60 -v z=$unixdate ' 
{

                expdate = $4 $5 $6
                
                if (expdate < z)
                {
                        
                        if (expdate < x)
                        {
                                print $1","$2","$3"," $5"."$6"."$4",O"  > ("/path/to/some/St")
                        }
                        else if (expdate >= x)
                        {
                                        if (expdate < w)
                                                {
                                                        print $1","$2","$3"," $5"."$6"."$4",D" > ("/path/to/some/De")
                                                }
                                        else
                                                {
                                                        print $1","$2","$3"," $5"."$6"."$4",N" > ("/path/to/some/In")
                                                }
                        }
                
                
                }
                                        
                else if (expdate >= z && $4 != 2030)
                {
                                                        print $1","$2","$3"," $5"."$6"."$4",A" > ("/path/to/some/Ak")
                }


}' myfile


but this new code does not do same thing like first one...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

problems with "cp" (reliant unix 5.43)

Hi, I've got a problem with the copy - command (reliant unix 5.43). It appears to me rather difficult to copy large amount of data. A command like "cp *.jpg" is simply refused. Does anybody know something about such a kind of restriction? Something like ... only 256 files could be copied at... (2 Replies)
Discussion started by: sysadv
2 Replies

2. Solaris

Problems with migration from Reliant Unix to Solaris

:confused: Hello folks, my company had decided to migrate from Reliant Unix to Solaris. We have an amount of sources that have to be changed a little, because these UNIX'es are slightly different. Is there a tool (hopefully free), which can do this job? Does anyone know the exactly differences, I... (2 Replies)
Discussion started by: MS-No
2 Replies

3. Filesystems, Disks and Memory

Disk Mirrors in Reliant Unix - Problem?

Hi Folks, This one has me a bit confused. I have a large system running Reliant 5.45 with an EMC 3930 disk array fibre attached. As part of our requirement I implemented host level mirroring in addition to the BCV functionality provided by the 3930. When the mirrors are split and the... (0 Replies)
Discussion started by: gull04
0 Replies

4. UNIX for Advanced & Expert Users

Reliant Unix and Disk Mirrors

Hi Folks, This is already posted on Disk & Memory, will post under expert incase there is someone here who has seen this before. This one has me a bit confused. I have a large system running Reliant 5.45 with an EMC 3930 disk array fibre attached. As part of our requirement I... (0 Replies)
Discussion started by: gull04
0 Replies

5. SCO

Converting

I use Sco_Sv 3.2v5.0.5 with parellel conection using dump terminals and i want to convert them to desktop pc. Anybody knows what hardware and other thing that would be involved? (3 Replies)
Discussion started by: seeyou
3 Replies

6. Shell Programming and Scripting

FTP on Reliant UNIX - script problem

Hello... I have script that works perfect on solaris but on Reliant UNIX sometimes it does not work ...I send files to my Xp(from Reliant UNIX) but if I try to send it to my solaris machine file can not be send... script is: #!/bin/ksh localFile=$1 remoteFile=$2 ... (0 Replies)
Discussion started by: amon
0 Replies

7. Solaris

converting midi to wav in solaris 10

how can i convert midi to wave in solaris 10 i have found timidity but it lack of documentation. is there any other suggestion? (1 Reply)
Discussion started by: conandor
1 Replies

8. UNIX for Dummies Questions & Answers

Converting HP-UX awk to Solaris

Hi, I am using awk in HP-UX to enter an encrypted entry of the password into /etc/passwd with success, this is the command I am using and it is working great. cat /tmp/passwd.gal.before|awk -F: -v gal_passwd="encrypted_password" '{OFS=":" ; print $1,gal_passwd,$3,$4,$5,$6,$7}' >... (3 Replies)
Discussion started by: galuzan
3 Replies

9. Shell Programming and Scripting

Converting from Linux bash (GNU) to Solaris script syntax errors

Original script written on CentOS 6.3 with GNU bash 4.1.2 Destination system is Solaris 9 with GNU bash 2.05 (not changeable by me) I have a script written on the linux side but now we need to provide a version to another site that "doesn't like linux". I've been going through changing the ] or... (13 Replies)
Discussion started by: oly_r
13 Replies

10. Shell Programming and Scripting

Need Help in converting

I have Excel file with the below three columns, i need your expertise in converting this to .csv file delimiter "|" Excel - Serial Number Serial Name Serial Brand 111 test sample 123 test2 sample1 134 ... (9 Replies)
Discussion started by: kiran_hp
9 Replies
APR-1-CONFIG(1) 						   User Commands						   APR-1-CONFIG(1)

NAME
apr-1-config - Return metainformation about apr library SYNOPSIS
apr-1-config [OPTION] DESCRIPTION
The apr-1-config program is used to retrieve information about the apr library in the system. It is typically used to compile and link against the library. When linking with libtool, an application should do something like: APR_LIBS="`apr-1-config --link-libtool --libs`" or when linking directly: APR_LIBS="`apr-1-config --link-ld --libs`" An application should use the results of --cflags, --cppflags, --includes, and --ldflags in their build process. OPTIONS
Known values for OPTION are: --prefix[=DIR] change prefix to DIR --bindir print location where binaries are installed --includedir print location where headers are installed --cc print C compiler name --cpp print C preprocessor name and any required options --cflags print C compiler flags --cppflags print C preprocessor flags --includes print include information --ldflags print linker flags --libs print additional libraries to link against --srcdir print APR source directory --installbuilddir print APR build helper directory --link-ld print link switch(es) for linking to APR --link-libtool print the libtool inputs for linking to APR --shlib-path-var print the name of the shared library path env var --apr-la-file print the path to the .la file, if available --apr-so-ext print the extensions of shared objects on this platform --apr-lib-target print the libtool target information --apr-libtool print the path to APR's libtool --version print the APR's version as a dotted triple --help print the help AUTHOR
This manual page was written by Vincent Danjean <Vincent.Danjean@ens-lyon.org> for the Debian project (but may be used by others). apr-1-config 1.2.2 March 2006 APR-1-CONFIG(1)
All times are GMT -4. The time now is 11:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy