Sponsored Content
Top Forums Shell Programming and Scripting Need help script to change the log file? Post 302343054 by justbow on Tuesday 11th of August 2009 11:49:11 AM
Old 08-11-2009
Hello Jean..
I think you forget about the Date, and Time also different.

Rgds,
Bow
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

script to change value in file

Hi, I have a parameter file and it contains following items $ cat TransactionParams From_Date_Parm=2005-02-25 To_Date_Parm=2005-05-25 Extract_Root_Parm=/detld1/etl/ascential/Ascential/DataStage/Projects/CTI_London/IAM Extract_Type_Parm=Transaction EDW_Database_Parm=hdw_erks... (1 Reply)
Discussion started by: gopskrish
1 Replies

2. Shell Programming and Scripting

script to ftp file (ip change)

Hi All, If I want to ftp files from machine to local pc. But the ip must change everytime :( (due to VPN), can I write a script to easiler (no need to update ip in script)? user_name=aaa password=bbb cat ip.txt # # FTP the files # ftp -d -in 199.200.204.109 <<EOF user $user_name... (2 Replies)
Discussion started by: happyv
2 Replies

3. Shell Programming and Scripting

Help with shell script for know when a file change it

Hi, IŽd like to know how to program a shell script for know when a file changes and based on that make another tasks all this in real time.. Thanks (2 Replies)
Discussion started by: mrios7
2 Replies

4. Shell Programming and Scripting

change file contents using script

Hi, Requirement:- Need to change pfile,so while executing script,it has to go to pfile location(ORACLE_HOME/dbs) and open init<SID>.ora file and change value db_name=<>. If db_name=abcd,script will change the db_name=1234 likr that.. Please help to code this (1 Reply)
Discussion started by: Sanal
1 Replies

5. UNIX for Dummies Questions & Answers

Script to change file name

Hi, I need to write a script that changes the name of the filename. Let's say my script is named change_filename and I want to use it on a file named test1.txt. After running the script I want the filename renamed to test1_fails.txt e.g. $ ls test1.txt test2.txt test3.txt $ ... (15 Replies)
Discussion started by: millsy5
15 Replies

6. Shell Programming and Scripting

shell script to change the extension of a file

I have a directory that contains several files, out of which some files are have an extra extension for example file1.new.new.new file2.new.new.new file3.new.new.new file4.new.new.new i want to write a shell script that rename all such file with only single extension like file1.new... (7 Replies)
Discussion started by: mukulverma2408
7 Replies

7. Shell Programming and Scripting

Need script to change a line in file....

Hello all, I have a line of code in a file that I need to change in the /etc/sysconfig/kdump file presently the line reads: KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off" what I need to do is put a comment out the 1st line and repeat it, and... (5 Replies)
Discussion started by: gartie
5 Replies

8. Shell Programming and Scripting

Script to change the file at one go on different UNIX machines

Hi Folks , I have a query that is I have a server (unix machhine) to which I login thru winscp or putty , mostly I use putty and at a particular location there is one xml(abc.xml) while which I change , let say 1) I login to first unix box hostname :- ccc74 username ... (1 Reply)
Discussion started by: tuntun27272727
1 Replies

9. Shell Programming and Scripting

Script to change name of a file with date

I have a file that contains todays date(for ex- test_08/30/2013) Now I want a script which will run and change the name of the file and put yesterday's date (for ex- test_08/29/2013) Please help. ---------- Post updated at 04:40 AM ---------- Previous update was at 04:31 AM ---------- I... (2 Replies)
Discussion started by: sv0081493
2 Replies

10. Shell Programming and Scripting

Script to change file names

I have a landing directory on my unix (solaris) server, that receives the following files: MLH4301I AAOT-hhslog.610.20150805.txt MLH4301I AAOT-hhslog.611.20150805.txt MLH4301I AAOT-hhslog.612.20150805.txt MLH4301I AAOT-hhslog.613.20150805.txt and I need to add to this files the number 10000... (6 Replies)
Discussion started by: fretagi
6 Replies
Test::MockTime::DateCalc(3pm)				User Contributed Perl Documentation			     Test::MockTime::DateCalc(3pm)

NAME
Test::MockTime::DateCalc -- fake time for Date::Calc functions SYNOPSIS
use Test::MockTime; use Test::MockTime::DateCalc; # before Date::Calc loads # ... use My::Module::Using::Date::Calc; DESCRIPTION
"Test::MockTime::DateCalc" arranges for the functions in "Date::Calc" to follow the Perl level "time" function (see perlfunc), and in particular any fake date/time set there by "Test::MockTime". The following "Date::Calc" functions are changed System_Clock Today Now Today_and_Now This_Year Gmtime Localtime Timezone Time_to_Date "Gmtime", "Localtime", "Timezone" and "Time_to_Date" are made to default to the Perl-level current "time". When called with an explicit time argument they're unchanged. Module Load Order "Test::MockTime" or similar fakery must be loaded first, before anything with a "time()" call, which includes "Test::MockTime::DateCalc". This is the same as all "CORE::GLOBAL" overrides, see "OVERRIDING CORE FUNCTIONS" in CORE. "Test::MockTime::DateCalc" must be loaded before "Date::Calc". If "Date::Calc" is already loaded then its functions might have been imported into other modules and such imports are not affected by the redefinitions made. For that reason "Test::MockTime::DateCalc" demands it be the one to load "Date::Calc" for the first time. Usually this simply means having "Test::MockTime::DateCalc" at the start of a test script, before the things you're going to test. use strict; use warnings; use Test::MockTime ':all'; use Test::MockTime::DateCalc; use My::Foo::Bar; set_fixed_time('1981-01-01T00:00:00Z'); is (My::Foo::Bar::something(), 1981); restore_time(); In a test script it's often good to have your own modules early to check they correctly load their pre-requisites. You might want a separate test script for that so you don't accidentally rely on "Test::MockTime::DateCalc" loading "Date::Calc" for you. Other Faking Modules "Test::MockTime::DateCalc" can be used with other modules which mangle the Perl-level "time" too. For example "Time::Fake", use Time::Fake; # fakery first use Test::MockTime::DateCalc; Or "Time::Mock", use Time::Mock; # fakery first use Test::MockTime::DateCalc; "Time::Warp" (as of version 0.5) only exports a new "time", it's not a core override and so can't be used with "Test::MockTime::DateCalc". SEE ALSO
Date::Calc, Test::MockTime, Time::Fake, Time::Mock faketime(1) HOME PAGE
http://user42.tuxfamily.org/test-mocktime-datecalc/index.html COPYRIGHT
Copyright 2009, 2010 Kevin Ryde Test-MockTime-DateCalc is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. Test-MockTime-DateCalc is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Test-MockTime-DateCalc. If not, see <http://www.gnu.org/licenses/>. perl v5.10.1 2010-09-15 Test::MockTime::DateCalc(3pm)
All times are GMT -4. The time now is 06:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy