Unix to Windows

Sort:
You are not authorized to post a reply.
Author
Messages
Greg Moeller
Veteran Member
Posts: 1498
Veteran Member

    As a part of our Infor10 upgrade, the company has elected to convert platforms to Windows.

    Fine.  Problem comes in, in that my co-worker and I have written a lot of shell scripts to do our work for us.

    They aren't converting cleanly... 

    For Example:  the cnvimp utility.  Seems to operate differently in Windows than in Unix.

    We are using it for IC500, RQ500, etc. jobs.. but it seems to truncate the trailing spaces off of the input file.

    Anyone found a way around this?

     

    Another thing, is that sometimes Windows appears to expect a file extension on tests if [ -s {$FILE} ]  If $FILE="any_file.txt" it appears to work well.  If instead it is $FILE="SNINVEN" the if test throws errors.

    Yes, simple enough to put a file extension on the file, but wondering why sometimes it works without and sometimes it does not like it.

     

     

     

    Mike C
    New Member
    Posts: 1
    New Member
      How are you converting the unix scripts? CYGWIN?
      Greg Moeller
      Veteran Member
      Posts: 1498
      Veteran Member
        Yes, we are trying to get them all to run under cygwin.
        JimY
        Veteran Member
        Posts: 510
        Veteran Member
          When we went from Unix to Windows I abandoned shell scripting and went to Perl. I am now starting to learn Powershell to see if that will be useful. We don't use cnvimp so sorry I can't help you out there.
          Greg Moeller
          Veteran Member
          Posts: 1498
          Veteran Member
            Update: We are making progress (of the forward type) on our upgrade to Windows.
            We've gotten most of our Korn shell scripts converted over and actually running via Windows Task Scheduler.
            Even gotten some of our Korn shell scripts callable from Portal/Workspace/Ming.le (whatever they are calling it these days) jobs or tokens.
            -- I can go into some detail here if requested -- (it doesn't make much sense to me why it works the way that it does, but at least it works)
            pbelsky
            Veteran Member
            Posts: 80
            Veteran Member
              Hey Jim, RE powershell ~ we are on windows and I have found it to be useful in certain situations. We put the exec command into a bat file and it can be called from tokendef or from within a 4GL program. One helpful thing i learned that I wanted to pass on, I found that sometimes scripts would hang unless I put a hard stop as the last statement in the script:

              stop-process -processname powershell -force

              Hope this helps!
              You are not authorized to post a reply.