setenv script or code

Could someone make this run in a script? I been trying all night but it seems impossible because the warning I get is that env is a built-in into the shell, itself. Maybe someone knows of a workaround. If it is not, would someone have some c or C++ code that can get the job done?

Code:
ENTER ENVIROMENT:

setenv JAILDIR /jails/nginx_server
 
While searching; the closest I came is within this thread but for my experiment it’s only a starting point that should help when dealing with a desktop and its jails. Opening a terminal automatically was nearly impossible to find... i did not think desktop gnome until a few hours ago, but I guest someone figured out what my questions were related to. Autostart is no problem … All I got to do now is figure out how to paste that one command on its command line with a script that will also close the window. Any ideas?

https://askubuntu.com/questions/536...ertain-text-already-input-on-the-command-line

Seem to be a match same time from difference sections of the globe . . . satriani thread below may be related to the same thing at the … our enviroment, but surely nullfs.
 
What software is asking that question?

Which shell is being used? setenv is for csh(1):

Code:
setenv JAILDIR /jails/nginx_server

sh(1) is different:
Code:
JAILDIR=/jails/nginx_server ; export JAILDIR
 
Which shell is being used? setenv is for csh(1):
Code:
root@com1:~ # setenv JAILDIR /jails/nginx_server
root@com1:~#
sh(1) is different:
Code:
root@com1:~ # JAILDIR=/jails/nginx_server ; export JAILDIR
JAILDIR=/jails/nginx_server: Command not found.
export: Command not found
I see csh(1), but what do sh(1) require? Is bash correct? Since your sequence seem to make things happen (exporting to get out of the cage), it seem to be exactly what I need. I’m going to have to make some changes, when I know for sure what to change. Trial and error is wearing me out.

FreeBSD say default is tcsh(1). I always use sh(1) for simple scripting only because samples can be found everywhere. I bet one those ports changed my default on its own. I have too many to list. I did not install bash but JAVA and whoever installed difference versions of bash, php, and other ports of the same name, claiming certain versions as dependency.

What is my default according to the list below? It looks like bash to me but I’m not really sure? This is what I have and I never touch it, ever! Last time I did chsh was on 8.2. It was just something to do to be cool. I never got serious until 10.0-10.1. So please forgive for my ignorance. I’m learning at the speed-of-light these days. So my default is csh, and I'm using bash on csh :(
Code:
/bin/sh
/bin/csh
/bin/tcsh
/usr/local/bin/[b]bash[/b]
/usr/local/bin/rbash
/usr/local/bin/ksh93
¯\_(ツ)_/¯
 
Back
Top