When we get CST time from log, the time difference to EST will be one hour. During that time increment, can we do the below?
First, why did you change LC_ALL in RudiC's suggestion to
?
Second, why did you change:
to:
? Do you really want to print a <slash> character after the year in your output?
Third, telling us that you use bash does not tell us whether or not the date utility on your operating system supports a -d option that will behave this way. The date -d option on my system does not behave this way on the system I'm using so I can't verify this, but I would think you want something more like:
Fourth, the test operator for string comparison is =, not -eq (which is for numeric comparisons) and, even if it did work, your test would only work when daylight saving time is not in effect. Maybe:
would come closer to doing what you want if you used:
unless you live in some parts of Indiana.
I have my main script calling another script to retrive a "ls -alt" of a directory that's located in a remote location I'm sftping into.
main.sh
#!/bin/ksh
getLS.sh > output.txt
getLS.sh
#!/bin/sh
/home<..>/sftp <host@ip> <<!
cd /some/dir/Log
ls -alt
quit
!
Basically I'd like to be... (2 Replies)
well i have this code here..and it works fine in kornshell..
#!/bin/ksh
home=c:/..../
input=$1
sed '1,3d' $input > $1.out
line=""
cat $1.out | while read a
do
line="$line $a"
done
echo $line > $1
rm $1.out
however...now i want it just in normal sh mode..how to convert this?... (21 Replies)
Helloo...
I am not much familiar with python..I found this small script in python I even do not have python on my computer...can anyone help me out to convert this into ksh or sh..
PLEASE any help I will appreciate..
here is python code..
#!/usr/bin/env python
import random # Get a... (3 Replies)
This is about how to Monitoring folder for new files using shell script
im doing a project using smsserver tools 3. i have used a perl script
to handle incoming messages. the content of each message must be
directed to a java program. this program generates the answer to reply
to the user... (2 Replies)
wondering if anyone has any thoughts to convert the below thru a shell script
Convert decimal signalling point notation to ANSI point code notation
There is a site that does that conversion but i need to implement the solution in a shell script.....Thoughts....
OS: Solaris 9
... (4 Replies)
The file contains code like the below and need to convert each one into a decimal
00 00 00 04 17 03 06 01
So the output should come as
0 0 0 4 23 3 6 1 (24 Replies)
Hi Folks,
My server time is in EDT. And i am sending automated mails from that server in which i need to display the current date time as per IST (GMT+5:30). Please advice how to display the date time as per IST.
IST time leads 9:30 mins to EDT. and i wrote something like below.
... (6 Replies)
Team ,
I am new to perl. Can someone help me out to convert LDIF file to csv format using perl logic ?
LDIF file format contains values :
ID : name/Bose-IND/ORD,cu-150,ou=ends
Connection_Time: 02:12:54 EST
LDAP: yes
Link: ABC Home Page - ABC.com
Expected outcome should with column... (0 Replies)