10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: Rovester
3 Replies
2. 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
3. Shell Programming and Scripting
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)
Discussion started by: angilulu
1 Replies
4. Shell Programming and Scripting
Hello all; hope someone can help me cause I am going crazy trying to find a solution for (what I think is simple) issue...looked hard up and down this forum and tried several "solutions" with no avail...so here's my issue:
I have this (parent) script: copylsofdcmcadefttosftpwithmove.sh
... (3 Replies)
Discussion started by: gvolpini
3 Replies
5. Shell Programming and Scripting
hi all
I have a file with many lines like
aa;bb;cc;dd;ee
bb;aa;dd;ee;bb
cc;ee;bb;dd;aa
ee;cc;bb;aa;dd
.
.
.
etc
The first line is in right format,Please help me how to use "SED" to change the rest of the lines to the format like line 1
thank all! (1 Reply)
Discussion started by: yuesko
1 Replies
6. 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
7. Shell Programming and Scripting
I am very green to shell programming and have no training and this is my first real attempt. I am fairly versed in Unix and running the cmds I need. I tried using the search feature but most of what I found was close but not quite what I am looking for, plus most looked more advanced than I... (7 Replies)
Discussion started by: htown71
7 Replies
8. 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
9. Shell Programming and Scripting
HI guys,
I have created a script to read 1 column in a csv file and then place it in text file.
However, when i checked out the text file, it is not in a column format...
Example:
CSV file contains
name,age
aa,11
bb,22
cc,33
After using awk to get first column
TXT file... (1 Reply)
Discussion started by: mdap
1 Replies
10. Shell Programming and Scripting
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)
Discussion started by: rawatds
1 Replies