10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
Here is my sample data
Test.txt
column 1|columne 2|start Date|end Date
test|test|03/24/2014|03/24/2014
test|test|03/24-2014|03/24/2014
test|test|03/24/2014|03/24/2014
test|test|03/24/2014|03/24-2014
test|test|03/24/2014|03/24/2014
Now in the file i am expecting the date fields should be... (4 Replies)
Discussion started by: krish2014
4 Replies
3. UNIX for Dummies Questions & Answers
Hi Unix Gurus,
I would like to rename several files in a Unix Directory . The filenames can have more than 1 underscore ( _ ) and the last underscore is always followed by a date in the format mmddyyyy. The Extension of the files can be .txt or .pdf or .xls etc and is case insensitive ie... (1 Reply)
Discussion started by: pchegoor
1 Replies
4. Shell Programming and Scripting
Hi All,
I am very new to unix and just started to work with unix and shell scripting.I have a query anyone help would be much appreciated
I am using sun solaris OS
I want to validate a file according to its date and if validate successful then it would write the file name,size,date and... (3 Replies)
Discussion started by: sv0081493
3 Replies
5. UNIX for Dummies Questions & Answers
I have a list of dates in the following format: mm/dd/yyyy and want to change these to the MySQL standard format: yyyy-mm-dd.
The dates in the original file may or may not be zero padded, so April is sometimes "04" and other times simply "4".
This is what I use to change the format:
sed -i '' -e... (2 Replies)
Discussion started by: figaro
2 Replies
6. Shell Programming and Scripting
I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column.
I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this?
Sample input
02/27/09,23:52:31
02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies
7. Shell Programming and Scripting
Hi all,
I have a shell script(K shell) which takes a date as input.
i want the input to be in DD-MM-YYYY format.
Can i enforce such a format of input string using just one line of code?
OR
do i need to parse the input date into different components and test them using Case statements... (2 Replies)
Discussion started by: rajugp1
2 Replies
8. Shell Programming and Scripting
Hi,
I want to validate if the given input is a valid month (written in long month format)
Jan / Feb / Mar / Apr / May / Jun etc etc
This is what I've got with || (or statements):
#!/usr/bin/ksh
INPUT_DATE=$1
FORMATTED_DATE=`date | cut -f2 -d' '`
#If there's no input use the... (1 Reply)
Discussion started by: Batsies
1 Replies
9. Shell Programming and Scripting
Hi
I am beginner to UNIX. I wanted to help for how to write script to validate date.
Please help me. (2 Replies)
Discussion started by: giridher2000
2 Replies
10. Shell Programming and Scripting
Hello,
I am currently writing a script that accepts an argument (month/date/year) when you run it. example: "./spell_date 03/12/90" I have gotten the 03/12/90 stored into variables and all, but I was wondering how i could print it out so that it would output: March, 12, 1990. Is there a way to... (1 Reply)
Discussion started by: MrGoldfinger
1 Replies