When i am trying to execute export command within a shell script it is saying command not found.
I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found"
My code is as follows:
--------------------------
output coming :
---------------
If i am directly specifying the export command inside the shell script, it is working, but when i am trying it through "/usr/atria/bin/cleartool setview -exec "export TMPDIR=/bldtmp/test/tmp;export UNPACKDIR=/var/tmp/unpackdir;echo After Export: $TMPDIR " test.view1" it is not working.
my shell version is:
Please help me on this.
Thanks
Last edited by Franklin52; 06-15-2012 at 04:36 AM..
Reason: Please use code tags for data and code samples
I don't know why the following shell script doesn't work. Could you please help me out?
#!/usr/bin/ksh
test="cal > /tmp/tmp.txt 2>&1"
$test
I know it will work for the following format:
#!/usr/bin/ksh
cal > /tmp/tmp.txt 2>&1
However, I need to get the command from the user in... (1 Reply)
Hi All
I am getting and error export command not found
What can be the possible reasons for this and how do we verify those
Please help me
Thanks (1 Reply)
Hello all,
I have just started doing shell scripting.
I want to read a file which stores the status of my job I have submitted
on a cluster.
The file looks something like this :
========================FILE=============================
crab: Checking the status of all jobs: please wait... (4 Replies)
Hi,
I need to run a script whenever the Cron file is modified.
The requirement is whenever a user modifies the cron file, the script should run automatically.
Can you please provide your inputs ? (5 Replies)
Hi All,
Linux lxs3er06 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux
Issue:
While executing shell scripts in bash shell, following error messages are thrown:
rm:command not found
On doing little investigation, I added '/bin' to $PATH and on doing echo... (9 Replies)
Hello,
I like to begin with :wall:.. literally... It has been 4 days and I have no idea how to fix it.
Environment - AIX 5.3
I wrote a script to call on ssh to log into another box via PKA to do something else.
If I run the script on the terminal, it works 100%. If the SAP customised... (11 Replies)
ssh -q <hostname> /opt/tcs/satish/tst.ksh
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh
tst.ksh has "nohup <command> & "
when i execute below script , its throwing error as
nohup can not be found
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh > log &
can someone let me... (5 Replies)
Hi ,
I have to write a shell script to telnet to specific host and execute the admin command there. Please help me to do that.
Eg : telnet hostname portno
admin command
exit (3 Replies)
Hello,
I need to execute below command in shell script
srvctl relocate service -d $database -s $service -i $avail -t $pref -f and also need to get the errors ,if any,in another file.
What's the right way to execute such commands in shell script?
Best regards,
Vishal (1 Reply)
friends,
i have application commands to execute in shell script it is something like this. i will login with user data it takes me to $ prompt. Example given below
login: data
ps : xxxx
$ MNSinput --this takes me to greater than prompt >
> ops --this is command i enter this output... (7 Replies)
Discussion started by: udaykrishna
7 Replies
LEARN ABOUT REDHAT
exportfs
exportfs(8) System Manager's Manual exportfs(8)NAME
exportfs - maintain list of NFS exported file systems
SYNOPSIS
/usr/sbin/exportfs [-avi] [-o options,..] [client:/path ..]
/usr/sbin/exportfs -r [-v]
/usr/sbin/exportfs [-av] -u [client:/path ..]
/usr/sbin/exportfs [-v]
DESCRIPTION
The exportfs command is used to maintain the current table of exported file systems for NFS. This list is kept in a separate file named
/var/lib/nfs/xtab which is read by mountd when a remote host requests access to mount a file tree, and parts of the list which are active
are kept in the kernel's export table.
Normally this xtab file is initialized with the list of all file systems named in /etc/exports by invoking exportfs -a.
However, administrators can choose to add and delete individual file systems without modifying /etc/exports using exportfs.
Any export requests which identify a specific host (rather than a subnet or netgroup etc) are entered directly into the kernel's export ta-
ble as well as being written to /var/lib/nfs/xtab. Further, any mount points listed in /var/lib/nfs/rmtab which match a non host-specific
export request will cause an appropriate export entry for the host given in rmtab to be entered into the kernel's export table.
OPTIONS -a Export or unexport all directories.
-o options,...
Specify a list of export options in the same manner as in exports(5).
-i Ignore the /etc/exports file, so that only default options and options given on the command line are used.
-r Reexport all directories. It synchronizes /var/lib/nfs/xtab with /etc/exports. It removes entries in /var/lib/nfs/xtab which are
deleted from /etc/exports, and remove any entries from the kernel export table which are no longer valid.
-u Unexport one or more directories.
-v Be verbose. When exporting or unexporting, show what's going on. When displaying the current export list, also display the list of
export options.
DISCUSSION
Exporting Directories
The first synopsis shows how to invoke the command when adding new entries to the export table. When using exportfs -a, all directories in
exports(5) are added to xtab and the resulting list is pushed into the kernel.
The host:/path argument specifies the directory to export along with the host or hosts to export it to. All formats described in exports(5)
are supported; to export a directory to the world, simply specify :/path.
The export options for a particular host/directory pair derive from several sources. There is a set of default options which can be over-
ridden by entries in /etc/exports (unless the -i option is given). In addition, the administrator may overide any options from these
sources using the -o argument which takes a comma-separated list of options in the same fashion as one would specify them in exports(5).
Thus, exportfs can also be used to modify the export options of an already exported directory.
Modifications of the kernel export table used by nfsd(8) take place immediately after parsing the command line and updating the xtab file.
The default export options are sync,ro,root_squash,no_delay.
Unexporting Directories
The third synopsis shows how to unexported a currently exported directory. When using exportfs -ua, all entries listed in xtab are removed
from the kernel export tables, and the file is cleared. This effectively shuts down all NFS activity.
To remove individial export entries, one can specify a host:/path pair. This deletes the specified entry from xtab and removes the corre-
sponding kernel entry (if any).
Dumping the Export Table
Invoking exportfs without further options shows the current list of exported file systems. When giving the -v option, the list of flags
pertaining to each export are shown in addition.
EXAMPLES
The following adds all directories listed in /etc/exports to /var/lib/nfs/xtab and pushes the resulting export entries into the kernel:
# exportfs -a
To export the /usr/tmp directory to host djando, allowing asynchronous writes, one would do this:
# exportfs -o async django:/usr/tmp
DEPENDENCIES
Exporting to IP networks, DNS and NIS domains does not enable clients from these groups to access NFS immediately; rather, these sorts of
exports are hints to mountd(8) to grant any mount requests from these clients. This is usually not a big problem, because any existing
mounts are preserved in rmtab across reboots.
When unexporting a network or domain entry, any current exports to members of this group will be checked against the remaining valid
exports and if they themselves are nolonger valid they will be removed.
SEE ALSO exports(5), mountd(8)AUTHORS
Olaf Kirch, <okir@monad.swb.de>
Neil Brown, <neilb@cse.unsw.edu.au>
7 Sep 1999 exportfs(8)