I've agonised over the same problem in the past (usually bash rather than perl, but the principle remains the same), and I finally succumed to hard coded formatting in the script.
Why would you use sudo in a cron job? Why not just add "reboot" to root's crontab?
falconindy
https://bbs.archlinux.org/profile.php?id=30251
2012-10-09T10:54:29Z
I applied my script to the wiki today, replacing the old one: https://wiki.archlinux.org/index.php/OS … ibernationThanks again for your help!
nuc
https://bbs.archlinux.org/profile.php?id=59620
2013-01-27T01:26:15Z
OK so I moved my autorun script out of the rc.lua and rewrote it into bash. As the file .xprofile gets read by LXDM (I use it) and .profile gets read by LXDM and the bash login shell, I source my script file from both files and launch graphical applications from .xprofile and command line applications (i.e. mpd) from .profile.
HI I am new to unix .
I wanted to create a cron job that runs a script every 10 min .So when I enter
Code:
vi /etc/crontab
I get the following output
Code:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root
yep probably this help in performance, but (joke) whi not remplace for zsh (/joke)no seriouslyI ask: why /bin/bash and not /usr/bin/env bash???I think only a sed script for change /bin/sh to (/usr/)bin/bash is needed and not patch anythink more
Jristz
https://bbs.archlinux.org/profile.php?id=49598
2012-11-03T01:01:33Z
Hey, trying to change my gdm's wallpaper using the described method of our wiki ( https://wiki.archlinux.org/index.php/GN … tomization ).Now when I try to login as gdm -> su - gdm -s /bin/bashI get that account currently unavailable and the shell is set to /sbin/nologin. What am I doing wrong ?
Hi,
Im trying to run script A which requires path /sbin.
I have a crontab entry to run script A every 10 minutes.
Script A is executed fine by cron, but because script A requires /sbin in its path it fails to run.
My situation is script A get overwritten from time to time so I can't modify script A to set path in there.
So my question is...
@mcarni, you know that when you use "sh <script>" you are specifying sh as the shell the script will be run with. In otherwords, you are overriding the shebang (#!/bin/bash) with /bin/sh. On our systems, we actually don't have an actual /bin/sh, as it is a symlink to bash. But when it is called via that symlink, it actually does its best to act like the old b