9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am not able to pass date stored in a variable as an argument to date command. I get current date value for from_date and to_date
#!/usr/bin/ksh
set -x
for s in server ; do
ssh -T $s <<-EOF
from_date="12-Jan-2015 12:02:09"
to_date="24-Jan-2015 13:02:09"
echo \$from_date
echo... (7 Replies)
Discussion started by: raj48
7 Replies
2. Shell Programming and Scripting
Doing a bcp load to sybase and need to convert datearg which comes in as 20130501 to 2013-05-01 which is the best way to do this (4 Replies)
Discussion started by: tasmac
4 Replies
3. Shell Programming and Scripting
Hi all,
I have used a bash script which ultimately converts a string into date using date --date option:
DATE=$DATE" "$TIME" "`date +%Y` //concatenating 2 strings
TMRW_DATE=`date --date="$DATE" +"%s"` //applying date command on string and getting the unixtime
Please use code tags... (7 Replies)
Discussion started by: Rashu123
7 Replies
4. UNIX for Dummies Questions & Answers
hi friends,
I m trying to write a script which compares to dates.
for this i am converting dates into no using synatx
as below
v2=`date | awk '{print $2,$3,$4}'`
v3=`date +%s -d "$v2"`
this syntax is working in bash shell ,but fails in ksh shell.
please suggest on this. (12 Replies)
Discussion started by: Jcpratap
12 Replies
5. Shell Programming and Scripting
my default profile is using ksh, I tried to write a simple scripts and I had issues, below is my scripts:
$ more if_num.ksh
USAGE="usage: if_num.ksh"
print -n "Enter two numbers: "
read x y
if ((x=y))
then
print "You entered the same number twice."
when I tried to executed the... (6 Replies)
Discussion started by: matthew00
6 Replies
6. Shell Programming and Scripting
Hi
I need help to write a script to do following:
Sample Input file1:
07-01-08 08:48:07:982 INFO ....
07-01-08 08:49:07:982 DETAIL .....
07-01-08 08:50:14:982 INFO .....
07-01-08 08:51:23:982 DETAIL .....
07-01-08 08:52:57:982 INFO .....
07-01-08 08:53:01:982 DETAIL .....
07-01-09... (1 Reply)
Discussion started by: mel_2008
1 Replies
7. Shell Programming and Scripting
Hi,
I have script in unix which creates a julian date like 126 or 127
I want convert this julian date into calender date
ex : input 127
output 07/may/2007 or 07/05/2007 or 07/05/07
rgds
srikanth (6 Replies)
Discussion started by: srikanthus2002
6 Replies
8. Shell Programming and Scripting
Hi all,
I have a directory have all of the .stat and .dat file :
they are is a pipe separate flat file.
Example:
log-20061202.stat contain 1st line and last line of log-20061202.dat with record count of that day.
Example:
Total record = 240
Tom|02-12-2006|1600 W.Santa... (18 Replies)
Discussion started by: sabercats
18 Replies
9. Shell Programming and Scripting
I trying to write a ksh script (without the help of the Kermit libraries) which connects to a ftp server and checks if the file "KEI.done" exists. If the file exists it print "files is there" if it doesnt exist it prints "file is not there". (the print statements will later be replaced with code to... (2 Replies)
Discussion started by: mike509123
2 Replies