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
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
3. Shell Programming and Scripting
Hi,
I am running this on Redhat 5.10
I have a simple test script called test.sh which has the following
contents and it uses the BASH shebang.
-------------------------------------------------------------
#!/bin/bash
eval `/tmp/filereader.pl /tmp/envfile.txt`
echo "TESTPATH=$TESTPATH"
... (28 Replies)
Discussion started by: waavman
28 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. UNIX for Dummies Questions & Answers
Hello,
i have cronjob:
crontab -l
* * * * * pkill -f domexpcheck;sh /root/dom/domexpcheck.sh
it runs:
/var/log/cron
Mar 25 12:11:01 vps crond: (root) CMD (pkill -f domexpcheck;sh /root/dom/domexpcheck.sh)
but somehow script dont run properly via cronjob. But when i execute cronjob... (7 Replies)
Discussion started by: postcd
7 Replies
6. 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
7. Shell Programming and Scripting
Hi all,
I'm not sure but I guess, that is a bash version issue.
The script working fine on "GNU bash, version 3.2.25(1)-release Ubuntu".
#!/bin/bash
while IFS=">" read a id val
do
if ]
then
VAL=${id%<*}; ID=${id#*</}
echo $VAL
echo $ID
sed... (5 Replies)
Discussion started by: research3
5 Replies
8. Solaris
Dear all,
How to upgrade bash's version? which way should be easy between remove the old version first and upgrade it or upgrade without remove?
Please, tell me how to upgrade step by step because I'm newbie
thank in advance (4 Replies)
Discussion started by: unitipon
4 Replies
9. 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
10. Shell Programming and Scripting
I am having trouble running a .sh file. The code 'x=${file_name:0:$z-11}' is giving me a bad substitution error. However when I run in BASH it works. Thing is when this goes to production the .sh will not be running in BASH. Is there a way to substring a string not in BASH or a way to invoke... (2 Replies)
Discussion started by: edwardtk11
2 Replies