10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
The below command works in the terminal interactively but not as part of a bash script. I though maybe I needed to escape the "$dir" so it isn't interpreted literally, but that's not it. Thank you :).
interactively in terminal
dir=/path/to
new=$(ls "$dir"/*.csv -tr | tail -n 1) && echo... (6 Replies)
Discussion started by: cmccabe
6 Replies
2. Shell Programming and Scripting
Hi,
maybe I'm asking a VERY dumb question, but would anybody out there tell me, why this f****** script won't work if executed as a cronjob, but works fine if executed from a shell prompt?
#! /bin/bash
set PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
date >>... (3 Replies)
Discussion started by: beislhur
3 Replies
3. Shell Programming and Scripting
I ran this script yesterday (in the background)
/usr/bin/nohup myfilelocation/myscriptname.sh &
the script worked perfectly.
i ran it today (also in the background) and just sat there. So i killed it and ran it normally and it worked perfectly.
Anyone suggest why it just sat there and... (8 Replies)
Discussion started by: twinion
8 Replies
4. Shell Programming and Scripting
Hi, I've got a Bash backup script I'm trying to run on a directory via a cron job nightly. If I ssh in and run the script manually it works flawlessly. If I set up the cron to run evertything is totally messed up I don't even know where to begin.
Basically the path structure is
... (6 Replies)
Discussion started by: wyclef
6 Replies
5. AIX
Hi
Script not getting executed via cron but executes successfully when executed manually. Please assist
cbspsap01(appuser) /app/scripts > cat restart.sh
#!/bin/ksh
cd /app/bin
date >>logfile.out
echo "Restart has been started....." >>logfile.out
date >>logfile.out
initfnsw -y restart... (3 Replies)
Discussion started by: samsungsamsung
3 Replies
6. Shell Programming and Scripting
dear list,
i've just write a simple php script to add user to my iptables, but some times it works and it dosn't work,, here's my script for my adduser.php
<?php
exec('/var/www/html/backup.sh');
$hash = "# $_POST\n";
$ip = "-A INPUT -p tcp -m tcp -s $_POST -d 10.10.105.18 --dport 8080 -j... (2 Replies)
Discussion started by: ridwanfi
2 Replies
7. Shell Programming and Scripting
Hello,
So my knowledge of bash scripting is not that great and I have been trying to solve this problem on my own for awhile to no avail.
Here's the error I get when running it with an OS that uses bash 3.2.x:
testagain.sh: line 10: *-1: syntax error: operand expected (error token is... (2 Replies)
Discussion started by: forkandspoon
2 Replies
8. Shell Programming and Scripting
I'm trying to use unison from bash on windows with cygwin. I don't know if this is a cygwin question, bash question or unison question. Since I always get reprimanded by the cygwin mailing list for assuming it is a cygwin problem, I'll assume it is a bash question.
The following commands work... (7 Replies)
Discussion started by: siegfried
7 Replies
9. Shell Programming and Scripting
dear friends,
i want to make a bash script that can be executed by many people simultaneously. do you have any idea to make it?
there will be many dependent-variables(which is input from people) in the scripts.
i am thinking about a random temporary file that created by the bash script each... (4 Replies)
Discussion started by: jimmbp
4 Replies
10. Shell Programming and Scripting
hi guys,
i have a problem.
a week ago i made a successful crontab that execute bash scripting daily, it worked well
but now, it doesn't work at all, in the mail i have:
"
/home/jimmy/cha/scripts/cekpderr
produced the following output:
lagi jalan
/home/jimmy/cha/scripts/cekpderr:... (6 Replies)
Discussion started by: jimmbp
6 Replies
bcrontab(1) General Commands Manual bcrontab(1)
NAME
bcrontab - Manage users crontab files
SYNOPSIS
bcrontab [ -u user ] file
bcrontab [ -u user ] { -l | -r | -e }
DESCRIPTION
bcrontab interfaces with the bcron-spool daemon to manage crontab files in the privileged spool directory.
OPTIONS
-u user
Tell bcron-spool that we are acting on behalf of the named user. bcron-spool will only accept the username if bcrontab is running
as either root or the same user ID as the named user.
-l List the cronab crontab to standard output.
-r Remove the user's crontab.
-e Edit the current crontab.
ENVIRONMENT
VISUAL If this is set, it is used as the editor to invoke to edit a crontab.
EDITOR If $VISUAL is not set and this is, it is used as the editor to invoke to edit a crontab. If neither are set, /bin/vi is used.
BCRON_SOCKET
The path to the named socket used to communicate with bcron-spool. Defaults to /var/run/bcron-spool.
LOGNAME
USER These two variables are used, in order, to determine the user name invoking the program. One must be set if the -u option is not
used.
FILES
bcrontab tries to writes a temporary file into the current directory, and then into /tmp if that fails, in order to edit the current
crontab.
SEE ALSO
bcron-spool(8), crontab(5)
AUTHOR
Bruce Guenter <bruceg@em.ca>
bcrontab(1)