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'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
Discussion started by: siegfried
3 Replies
3. Shell Programming and Scripting
Hello all,
I am facing a weird issue while executing a code below -
#!/bin/bash
cd /wload/baot/home/baotasa0/sandboxes_finance/ext_ukba_bde/pset
sh UKBA_publish.sh UKBA 28082015 3
if
then
echo "Param file conversion for all the areas are completed, please check in your home directory"... (2 Replies)
Discussion started by: ektubbe
2 Replies
4. 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
5. 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
6. 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
7. 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
8. UNIX for Dummies Questions & Answers
Suppose you have a directory called "olddir" exists but no "newdir", you want to rename "olddir" to"newdir"
In previous versions (at least in 2.05b.0) of bash, you can try
mv olddir/ newdir/
OR
mv olddir/ newdir
But in new versions of bash, if you
mv olddir/ newdir/
BASH panics:
mv:... (5 Replies)
Discussion started by: meili100
5 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