Welcome to the Linux Foundation Forum!

hpux style "print" command for RHEL8 (and others maybe)


Hi all, first post! I am in the process of converting an old HPUX box over to RHEL8. One of my minor hurdles to overcome appears to be one or more built in commands that are different and/or missing. The one I'm looking at right now is the HPUX "print" command. This command is used in hundreds of ksh scripts that are being transitioned to the new server and I'm looking for an easy solution. One might think that it would be easy just to search and replace print for printf or create a symbolic link in /usr/bin causing print to call printf, but that presents a problem. The HPUX print command by default includes a linefeed. The RHEL8 printf command does not and must have each statement being printed appended with a \n. Big hassle.

Is there an HPUX-style "print" command for RHEL8 that I just haven't been able to find?
Is there another easy solution I haven't thought of?

Thanks so much!
I'm sure I'll be back with a few more questions like this as I move through this process.


  • smhyde

    Oh never mind. I just figured it out. In case anyone else needs this help in the future, the simple solution was to change the user shell from bash to ksh. Since all of our previous work product is in ksh, there's no need for the bash shell on this new box. As soon as I changed the shell all my problems disappeared.

    chsh -s /bin/ksh


Upcoming Training