#!/bin/sh
# Run under BASH non-interactive shell
IFS="$(printf '\n\t')" # Remove 'space', so filenames with spaces work well
oldpwd=$PWD
SHELL=/bin/bash
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
USER="root"
USERNAME="root"
cd /root/mycron
bash run_xfs_fsr /var/log/xfs_fsr.log /root/mycron/.fsrlast_xfs 10800
cd $oldpwd
exit $?
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)