SHELL unix system variable
Posted in 1992
Thanks for the answers to my security problem:
setting the SHELL variable to /dev/null works.
SHELL=/dev/null;export SHELL
in the first line on the .profile allowed users to go straight to
a locked-in menu shell, still allows them to call up informix routines
and just redraws the screen when they do an ! to shell out or do a sh
command.
cheryl gross
(903)334-3518
Red River Army Depot
Texarkana, TX
Also,
As a try at getting ruchi what he needed:
In bourne shell there is the cut command and I believe it would still
work the same under ksh.
cut -c2-85 filename > newfile
would take characters 2 thru 85 and put them in file newfile
create a file layout file:
with the positions where you want data:
#layout_file
FILE "/full/path/newfile"
(dataname1 1-3,
dataname2 4-7,
dataname3 10 - 51,
dataname4 52 - 53;
INSERT into tablename;
Then create another file with your loadscript in it:
#load_program
dbload -d databasename -c layout_file -l errfile -e 1000
Prepare your file in the format needed to load to the database.
Create your layout_file using the name of the file you created
instead of newfile and replace dataname1, etc. with the database variable
names that you have used in your database.
The 1-3, 4-7, 10-51 are the positions where the data is found in your newfile
Replace the tablename with the name of your database table.
Create the load_program using database name layout_file name that you created
above then
Execute the load_program at the $ prompt.
There may be another better way, but this works for us.