Hi All,
I am getting two input from User for Date from the command prompt when
my script is executed .
The date format i am taking is : DD-MM-YYYY
so is there any method in Unix to validate the two input date.
There might be many cases for these two date to be invalid.... (1 Reply)
i've looked at a bunch of the date comparison threads on these boards but unfortunately not been able to figure this thing out yet. still confused by some of the way conditionals handle variables...
here is what i where i am now...
# a bunch of initializition steps are here ...... (1 Reply)
Can somone take a look at this script for me - I'm trying to get it to exit if the format of dateToLookFor is not in the format YYYYMMDD:
function search
{
cd $logsloc
echo "Enter date in format YYYYMMDD (enter to exit):"
read dateToLookFor
echo $dateToLookFor | grep -q ... (2 Replies)
Guys,
Need your help coz my server runs in local time GMT +8, but when client use ftp and login, the resulting timestamp seen in each file is in UTC format. We need to set that the time should be the same as GMT +8 when in ftp session.
I am using RHEL 5.3.
root@]# ll
total 1740... (2 Replies)
Hi! how do i know if the input is the same as the required date format? the date should be dd/mm/YYYY ex. 2/3/2012 or 15/11/2012
all the following conditions must return an error:
*input of string
*day is > 31 or < 1
*month is > 12 or < 1
*year is < 2013
suppose the date format is stored... (1 Reply)
Hi,
Am trying to get a normalized date value irrespective of the time zone of the machine in which following code is run.
When the following code is run in 2 different machines with TZ=UTC and TZ=PDT, I get 2 different values.
I simply want to normalize the output that is specific to a... (3 Replies)
DST started on Oct 20th in Brazil.
If I run the below command in that time zone,
date +%s -d "10/20/2013" it throws an error message "Invalid date" . But it works fine for other dates including 19th and 21st Oct.
Any idea ? Is there any unix patch ? (2 Replies)
Hi! All,
I am trying to reset the date and time since the change in time over the weekend. I cannot issue the command date -t 201703131330.
The system gives me an error invalid option.
This happens on my SCO OpenServer 5.0.7 and 5.0.6. Do anyone have an idea why? I even tried using... (6 Replies)
Hello, so basically i have a txt file containing "foto's" named YYYY-MM-DD_HH.mm.ss.jpeg.
But since it can probably not convert it it changes the date to the current date. What am i doing wrong?
#!/bin/bash
inputDateFmt()
{
sed -e 's/_/ /g' -e 's/\./:/g' <<< "$1"
}
begindatum=$(date... (3 Replies)
i try to set linux date & time in specific format but it keep giving me error
Example :
date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
or
date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
keep giving me this error :
date: invalid date ‘19-01-2017 00:05:01'
Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies
LEARN ABOUT DEBIAN
update-locale
UPDATE-LOCALE(8) System Manager's Manual UPDATE-LOCALE(8)NAME
update-locale - Modify global locale settings
SYNTAX
update-locale [OPTIONS] [var=locale | var] [...]
DESCRIPTION
This program can be called by maintainer scripts when Debian packages are installed or removed, it updates the /etc/default/locale file to
reflect changes in system configuration related to global locale settings. When variables have no value assigned, they are removed from
the locale file. Some basic checks are performed to ensure that requested settings are valid.
OPTIONS --help Display an help message and exit.
--reset
Variables which are not set on command-line are cleared out.
--locale-file FILE
Define file containing locale variables. (Default: /etc/default/locale)
--no-checks
Do not perform sanity checks on locale variables.
EXAMPLE
The command
update-locale LANG=en_CA.UTF-8 LANGUAGE
sets LANG to en_CA.UTF-8 and removes definitions for LANGUAGE.
FILES
/etc/default/locale
File where global locale settings are stored.
AUTHOR
Denis Barbier <barbier@linuxfr.org>
SEE ALSO locale-gen(8), locale(1)Debian GNU/Linux April 2006 UPDATE-LOCALE(8)