10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a string time=20170303201234
I want to split it and put a dot
result:
20170303.201234
CODE:
ttdotss=`echo ${time} | {8}.{8}`
Doesn't understand
I tried this:
CODE:
ttdotss=`echo ${time} |cut -c 1-8 | . | cut -c 9-14`
Result:
script: .: argument expected... (4 Replies)
Discussion started by: digioleg54
4 Replies
2. Shell Programming and Scripting
Hi guys thanks for the help for my previous posts.Now i have a requirement that i download a XMl file which has UTC time stamp.I need to convert UTC time into Unix server timezone.
For ex if the time zone of unix server is CDT then i need to convert into CDT.whatever may be the system time... (5 Replies)
Discussion started by: mohanalakshmi
5 Replies
3. UNIX for Dummies Questions & Answers
Hi,
A few days ago I changed my CentOS box's timezone to -07:00.
Now the date commands output look like this (run almost simultaneously, less than 1 second delay)..
# date
Mon Sep 5 20:23:40 PDT 2011
# date -u
Tue Sep 6 03:24:05 UTC 2011
The hours difference seems correct, but why is... (2 Replies)
Discussion started by: forte712
2 Replies
4. Shell Programming and Scripting
Hello All -
I have a script that grabs data from the net and outputs the following data
46029 46.144 -124.510 2010 07 26 22 50 320 4.0 6.0 2.2 9 6.8 311 1012.1 -0.9 13.3 13.5 13.3 - -
46041 47.353 -124.731 2010 07 26 22 50 250 2.0 3.0 1.6 8 6.4 - 1011.6 - ... (0 Replies)
Discussion started by: drexnefex
0 Replies
5. AIX
Hello,
Using AIX6.1 box.
I have UTC time value and need to convert it to local time value - I mean time zone and DST should be taken into consideration.
I hope it could be done using shell environment - I don't want to write a program.
thanks
Vilius
---------- Post updated at 02:30 PM... (2 Replies)
Discussion started by: vilius
2 Replies
6. Shell Programming and Scripting
Hi,
I need to convert a number representing time in UTC seconds to a date. Ex:
3BE0082C --> Oct 31 2001 15:31:08
I have tried the following perl command but it gives a different answer?
$ perl -e 'print scalar localtime(shift), "\n"' 3BE00B2C
Thu Jan 1 03:00:03 1970
Any ideas? Thanks. :) (10 Replies)
Discussion started by: GNMIKE
10 Replies
7. Shell Programming and Scripting
In my shell script i have a variable which stores date in the format of YYYYMMDD. Is there any way to format this value to MM/DD/YYYY.
Thanks. (8 Replies)
Discussion started by: nasirgondal
8 Replies
8. Shell Programming and Scripting
Hi
i need to convert a date in the format DD-Mon-YY to YYYYDDMM
Ex : 01-JUL-00 to 20000701
Can anybdy help me with this??
Thanks in advance
Shenaz (5 Replies)
Discussion started by: shanu_85
5 Replies
9. UNIX for Dummies Questions & Answers
how to convert the string YYYYMMDD into YYYY.MM.DD
Please advice (1 Reply)
Discussion started by: spatra
1 Replies
10. Shell Programming and Scripting
Okay, I have posted on here one other time and received very fast help, so I figured I'd post again.
Searched for awhile and couldn't find exactly what I'm looking for.
I am attempting to write a script that will search through a given directory, or search through the current directory, and... (10 Replies)
Discussion started by: cbo0485
10 Replies