You are first using variable TDATE without setting it then trying to use tdate (without a $ either) to set the timestamp of your file so could these be issues?
What are you trying to actually achieve?
If you stick to one variable name, perhaps this will help:-
This should set the file /tmp/dummy to have timestamp of 12:34 on the last day of 2016.
Hi,
For my bash script, terminal with bash is generate an OK output and program works right.
already,
terminal with ash have "line 48: syntax error: Bad substitution" output and program don't work.
:confused: (0 Replies)
I'm getting to grips with this concept of the umask.
What I thought was, setting umask uga+rwx would result in creating files with all permissions for everyone. Seems not to be the case though. Read and write bits get set, but not the execute bit.
Is there some gap in my understanding, or is... (2 Replies)
Hello all,
I have a file - 12.txt
cat 12.txt
===============================================
Number of executions = 2 Total execution time (sec.ms) = 0.009883
Number of executions = 8 Total execution time (sec.ms) = 0.001270
Number of... (23 Replies)
Hi All,
I am not much strong in shell scripting...
I am using sed command in my script to find and replace a string.......
This is how script looks :
#############
#!/usr/bin/ksh
CONFIG_FILE=iom_test.txt
FIND=`echo "NIS_FTP_SERVER1=123.456.iom.com"`
REPLACE=`echo... (2 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
If I enter (simplified):
find . -printf "%p\n"
then all files in the output are prepended by a "." like
./local/share/test23.log
How can achieve that
a.) the leading "./" is omitted
and/or
b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Hi All,
I'm completely new to bash scripting and still learning my way through albeit vey slowly.
I need to know where to insert my server names', my ip address numbers through out the script alas to no avail.
I'm also searching on how to save .sh (bash shell) script properly.... (25 Replies)
I am facing this weird issue where the script is working fine from the command line but when I am executing it from cron though it is working fine but the "if" loop is processing else part though I know that the if part of the logic is true and ideally the loop should execute the if portion.
... (3 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT DEBIAN
tinydyndns-update
tinydyndns-update(8) System Manager's Manual tinydyndns-update(8)NAME
tinydyndns-update - update TYPE A record in data.cdb
SYNOPSIS
tinydyndns-update fqdn dynip
DESCRIPTION
tinydyndns-update changes the data of a TYPE A record in data.cdb in the current directory. Other than tinydns-data(8), tinydndns-update
does not know about the source file data but changes the binary database data.cdb directly.
First tinydyndns-update checks if the given fqdn has a TYPE A record in data.cdb. Then it checks if the given IP address differs from the
one in the TYPE A record in data.cdb, or if the record's timestamp should be updated. Finally if data.cdb needs to change, tinydyndns-
update copies data.cdb to data.tmp, changes the IP address of the TYPE A record of fqdn to dynip in data.tmp, optionally adjusts time-to-
live or time-to-die, and renames data.tmp to data.cdb.
ENVIRONMENT
TTL time-to-live. The environment variable TTL overrides the default time-to-live in seconds (0 if TTD is set, otherwise 5). If TTL is
not set or zero, the time-to-live of the record will not change. $TTL must be an integer.
TTD time-to-die. $TTD must be an integer, specifying a number of seconds. If TTD is set, the timestamp of the record is set to the
current time plus $TTD seconds, and TTL is set to zero by default, so that tinydns(8) interpretes the timestamp as time-to-die.
Note: you probably want to adjust SOA ttl, or create a wildcard record, to prevent DNS caches from caching nxdomain, when using this
feature.
LOC location. $LOC must be two characters long. If LOC is set, it specifies the client location for records to be updated.
EXIT CODES
If tinydyndns-update cannot find a TYPE A record for fqdn in data.cdb, it prints a warning and exits 114.
If dynip does not differ from the IP address of the TYPE A record of fqdn in data.cdb, and the environment variable TTD is not set, tiny-
dyndns-update prints a note and exits 0.
tinydyndns-update exits 100 if it has trouble opening data.cdb, and leaves data.cdb unchanged.
tinydyndns-update exits 111 on temporary error, and leaves data.cdb unchanged.
If data.cdb was changed successfully, tinydyndns-update exits 0.
FILES
./data.cdb
./data.tmp
SEE ALSO tinydyndns-data(8), tinydyndns-conf(8)
http://smarden.org/tinydyndns/
AUTHOR
Gerrit Pape <pape@smarden.org>
tinydyndns-update(8)