It is almost always the result of environment variables not being declared correctly.
change the script itself to run ALL login scripts:
/etc/profile
$HOME/.profile
$HOME/.bashrc
and any other 'setup' scripts there are.
Thanks for the suggestion, Jim
I was surprised to find that /etc/profile, $HOME/.profile, and $HOME/.bashrc are not executable.
So I ran run_xfs_fsr from cron printing environment variables.
From cron:
From login:
As a sort of test, I added these environment variable to run_xfs_fsr:
The test failed, as xfs_fsr still output to syslog. Here is the env from this run:
Then I tried adding the LESSOPEN and LESSCLOSE, with the same unhappy results:
Then I tried changing the xfs_xfs.sh script to:
hoping to properly initialize the BASH sub-shell. It produce no change in the result.
Still on my mind, however, is the question why the xfs utility xfs_db prints as expected, but the xfs reorganization program xfs_fsr does not???
I have searched far and wide for an explanation for some odd behavior for output redirection and haven't come up with anything.
A co-worker was working on old scripts which have run for years and embedded in their code were output redirects which worked for the script during execution and then... (5 Replies)
Status quo is, within a web application, which is coded completely in php (not by me, I dont know php), I have to fill out several fields, and execute it manually by clicking the "go" button in my browser, several times a day.
Thats because:
The script itself pulls data (textfiles) from a... (3 Replies)
Hi
A Ksh script is deployed in a server and executed through cronjob.
If one of the line in the middle of the script fails . Are the remaining lines executed ? (3 Replies)
Dear All
many hosting companies do have provision of cron tab settings
In case a web hosting company do not have such facility can I run cron tab job (1 Reply)
Hello all new to linux here...
Please help,... when using Pico how can I open and edit the bash Linux login file (stored in your Linux root directory). I would like to add the new commands for items listed below.
a) display contents of a directory => mycd
b) display date and time =>... (4 Replies)
Hi guys,
I know computers don't misbehave.
But I'm puzzled by what's happening right know in a script :
I simplified the example to point out what seems weird to me.
Don't try to find any sense to this stupid script.
There are 10 rows in /tmp/tmp.txt
i=0
tmpfile=/tmp/tmp.txt
while... (3 Replies)
I use plink.exe to automate remote commands that return data to Windows machines. This works well on newer servers running Red Hat since the commands were developed for bash and the designated user's login shell is bash. I need to also support older servers which are running Solaris 10 but the... (5 Replies)
So I'm trying to pass certain json elements as env vars and use them later on in a script.
Sample json:
JSON='{
"Element1": "file-123456",
"Element2": "Name, of, company written in, a very weird way",
"Element3": "path/to/some/file.txt",
}'
(part of the) script:
for s... (5 Replies)