Microsoft
Software
Hardware
Network
Question : How to force user to place 'ksh' before running a shell script
Here is the issue, I have written a ksh script that is to be run both Unix and Linux, since the script containts logic and features that only "korn" will give better/valid result, so what I want is:
whenever this program is excuted, make sure it will be running like below:
$ ksh myprog.sh
if user enter $ sh myprogram.sh
the program will prompt the use to enter "ksh myprogram.sh" instead.
Why I am asking for this, so I don't need to care wheather the default shell for a give user is a bash/csh/
What I want is logic in "myprogram.sh" to check if user does enetr the ksh before the $0 !
Thank you,
David
Answer : How to force user to place 'ksh' before running a shell script
Change
ksh=$(set | grep ksh)
to
ksh=`set | grep ksh`
Random Solutions
how to scan for text in a row and then hide that column
Picture people/Olan Mills Vs Sears/Walmart
CRM - Sales management - db design - MS Sql server 2005
Reinstall CAS Windows SBS 2008 - can't find EXCHSRV80 folder
Windows SBS 2000
Delete Enable Passwords
password
When machine in locked state can Outlook forward all emails to a Hotmail account?
Write a trigger which, when the salary of any employee(s) is updated, inserts a single record into this audit table with the total amount of the change across all employees.
Sahi, ReferenceError: "$Array2" is not defined.