Search Results

Search: Posts Made By: vrupatel
3,306
Posted By vrupatel
Subtract minutes from date
Hi,

I am reading a particular date from a file using below command

WFLWDATE=$(sed '2q;d' FileA.prm)

The echo command outputs the correct date in variable WFLWDATE

Now I want to subtract 5...
1,055
Posted By vrupatel
Thanks Pikk45 , but I am not able to get as to...
Thanks Pikk45 , but I am not able to get as to how I can read the value of "TimeBefore' and assign it to "TimeAfter1"

How can I read and assign the value of "TimeBefore" to "TimeAfter1"

- VP
...
1,055
Posted By vrupatel
Hi, I will be invoking this script from...
Hi,

I will be invoking this script from Informatica ETL Tool.

First run will set TimeBefore=2014-07-10.18.06.55. I am achieving this using SED command as below

cd /TWData/control/Param/ &&...
1,055
Posted By vrupatel
Updating a File
Hi,

I have a below requirement and need your help in this regard.

I have two timestamps in a file i.e.

TimeBefore=2014-07-10.18.06.55
TimeAfter_1=2014-07-09.05.45.12...
1,201
Posted By vrupatel
Thank you very much Rudic, Makarand and Vishal...
Thank you very much Rudic, Makarand and Vishal for your help.
1,201
Posted By vrupatel
Thanks Vishal & Rudic for your inputs. Vishal I...
Thanks Vishal & Rudic for your inputs. Vishal I tried you code and its gibing me below error:

update.sh[2]: ^M: not found
' unexpected: syntax error at line 10 : `in


I am calling script as ...
1,201
Posted By vrupatel
Conditional Script
Hi,

I have a script file which has some simple commands. I want these commands to be executed based on the input. Ia m good with IF statement also. At the end it has to be based on incoming value....
2,111
Posted By vrupatel
Thanks Robin. That seems to be working as...
Thanks Robin. That seems to be working as expected at my end. Thank you very much
2,111
Posted By vrupatel
Thanks Robin, but I need it in ...
Thanks Robin, but I need it in "%Y-%m-%d-%H.%M.%S" format

Regards,
Vrushank Patel
2,111
Posted By vrupatel
Minus 5 minutes
Hi,

I need to subtract 5 minutes from the date. Example

$date +"%Y-%m-%d-%H.%M.%S" displays 2014-06-26-06.06.38

I want to show it as 2014-06-26-06.01.38 (5 mins are subtracted from date)
...
4,099
Posted By vrupatel
Thank you Akshay & Scrutinizer. It worked for...
Thank you Akshay & Scrutinizer. It worked for me.
4,099
Posted By vrupatel
Thanks Akshay. When I run this cmd it displays me...
Thanks Akshay. When I run this cmd it displays me the content of file with updated date but when I try to open up File its still showing the old date.Its not updating the file. Is this because the...
4,099
Posted By vrupatel
Replace date in a file
Hi,

I have a file named as 'Todays.prm'. This file has a date on a second line. I want to replace the date to todays date whenever this command is executed.

My File looks as below:

[GLOBAL]...
Showing results 1 to 13 of 13

 
All times are GMT -4. The time now is 10:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy