Bash script error: missing destination file name operand.
Ok, i've been messing around in debian the past few days, setting up programs like subversion, mysql and logrotate. The purpose of this script is to use subversion to backup the binary logs. It runs in the cron every 2 hours or so (although I can't get my script to run properly atm, which is why i'm here).
It also changes the filename to the format logfile-"current date" so as to keep it fairly sorted in subversion.
I'm more or less learning how to write scripts straight off the internet, so, in my defence, I could be using horribly bad practice or completely incorrect syntax, I'm not sure at the moment.
This is the code:
This is the error I get when it runs:
I'm guessing either my file path is wrong (although i've gotten similar scripts to work), or i've stuffed up the if/else statement.
In the below bash I am trying to ensure that all folders (represented by $folders) in a given directory are created. In the file f1 the trimmed folder will be there somewhere (will be multiple trimmed folders).
When that trimmed folder is found (represented by $S5) the the contents of $2 printed... (19 Replies)
Hi Again,
I have a file that contains date and time for the past 2 hours. What i need is add missing date and time in a file.
INPUT
2016-01-13 01:33 10
2016-01-13 01:31 10
2016-01-13 01:30 10
2016-01-13 01:29 10
2016-01-13 01:28 10
2016-01-13 01:27 10
2016-01-13 01:26 10
2016-01-13... (14 Replies)
Hello Team,
Is there any Linux command / script available so that, I could create a simple 0 byte file in destination server by issuing the command from source server.
If yes, Could you please let me know the possible solutions.
in other words I just want to create a touch file in my home... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Create a script that displays output with a specific parameter.
For example, for a script called score... (1 Reply)
I just put together a script for work that will essentially automate the migration of our Windows fileserver to my newly created Debian based SAMBA server.
My script will create the necessary directories then copy the data over to my new server, after that it will set the ACL's by using... (3 Replies)
Hello kind programmers :)
I am a newbie and running into an error "line 28: syntax error: unexpected end of file" on the script shown below. Any help would be greatly appreciated. Thanks!
#! /bin/bash
if ($#argv <3) then
echo 'Usage get_modis_snow '
echo 'ftp script for MYD10A2... (2 Replies)
Hi everyone, and thanks to all for your assistance.
I have a problem with the rsync command. I want to make a backup of a "source" directory in a "destination" directory.
I want to specify:
"absolute path of destination" (identified by a ~): ~/Destination
or a "relative path of... (0 Replies)
Hi Guys,
I am creating a couple of temp. files in a script. After completing the script, I am using the rm command to delete these files. The files are getting deleted but I am getting "filename - cannot find file;no such file or directory" error in my bash shell terminal window.
I am using... (3 Replies)
When i tyr this, it gives me a syntax error...i tried removing quotes,removing spaces,replacing -eq with '='.. Can somebody suggest that is the problem?
if ]; then (4 Replies)