Sponsored Content
Top Forums Shell Programming and Scripting Problem with date in conjunction with cut? Post 302570202 by DuskFall on Wednesday 2nd of November 2011 03:44:55 PM
Old 11-02-2011
Thank you, just waiting for it to come round and...It works. Thank you so much, this has been bugging me since last night sometime...
My final question is : How can i stop it from saying "Current time : 19:44:1"
and make it say "Current time : 19:44:01" without screwing it all up?
Never mind, Thank you so much Corona, you've been a great help
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Cut date using y hat as delimiter

QUESTION: How can I cut out the date from just the first line and reformat it to 31-Jul-2007? I'll restate the question at the bottom again... DESCRIPTION: I need to cut a date out of a file - an example of the date's format in the file is 2007-07-31. It's in the 5th field and is separated... (1 Reply)
Discussion started by: tekster757
1 Replies

2. Shell Programming and Scripting

conjunction two files

I need to your help. I want write a script search for rows in file1 if exist in file2 it will print rows from file2 else it will print rows from file1 with out any duplicate ... (4 Replies)
Discussion started by: kmuqalled
4 Replies

3. UNIX for Dummies Questions & Answers

'Cut'ting date time

My apache logs look like this... PHP Warning: Invalid argument supplied for foreach() in /usr/local/apache2/htdocs/myfile.php PHP Warning: Invalid argument supplied for foreach() in /usr/local/apache2/htdocs/myfile.php PHP Warning: Invalid argument supplied for foreach() in... (1 Reply)
Discussion started by: shantanuo
1 Replies

4. Shell Programming and Scripting

cut problem

Hi, sample datas are : drwxr-xr-x 2 beewin abidev 96 Jun 13 2006 bwin drwxrwxr-x 2 blsmg01 smg 96 Jun 13 2006 blsmg01 drwxr-xr-x 2 ccmdummy ccm_root 8192 Jun 13 2006 ccmdum drwxr-xr-x 5 dipayan users 8192 Oct 29 09:05 dip I want to cut the last field. I use ls -ll | grep... (7 Replies)
Discussion started by: samir_standing
7 Replies

5. Shell Programming and Scripting

Cut and WhiteSpace Problem

Hi, I have a shell script that reads a parameter file to set variables. I have an issue when the parameter I try to read contains whitespace. e.g File Contents Code The result is SUBJECT is set to and I want subject set to I've tried different variations but nothing seems to... (19 Replies)
Discussion started by: Greygor
19 Replies

6. Shell Programming and Scripting

Problem with cut

I need to read in a file and output it without the comments or newlines. The problem is that is not outputting it properly. STUDENTSDETAILFILE="../data/studentDetails.txt" for getlines in `sed '/#/d' $STUDENTSDETAILFILE` do STUDENTID=`echo $getlines | cut -d: -f1` ... (1 Reply)
Discussion started by: nerdbot
1 Replies

7. Shell Programming and Scripting

Missing conjunction

Hi Gurus, I have prepared a script to find the log file based on a date range defined in one of the environment files, archive the logs files and move them to a particular directory. Below is the script: . /home/.profile . /home/.inf_env logfile=$scripts_path/Logs/file_archive1.log... (17 Replies)
Discussion started by: svajhala
17 Replies

8. Shell Programming and Scripting

Problem with cut and wc

Hi, I am facing issue with cut and wc. here is the sample. the data in file - tail -1 05_19_BT_TBL_LOAD_20120524064242.bad|cut -c9-58 WatsSaver - AGGREGATED PLAN1581 CALLS FOR 2872.6 tail -1 05_19_BT_TBL_LOAD_20120524064242.bad|cut -c9-58|wc -c 51 tail -1... (12 Replies)
Discussion started by: donadarsh
12 Replies

9. UNIX for Dummies Questions & Answers

Nohup in conjunction with time

hi, if I exectute "nohup time ls -1" I get the following output $ nohup time ls -1 file_1 file_2 file_3 file_4 file_5 0.000u 0.001s 0:00.00 0.0% 0+0k 0+0io 0pf+0w This is all OK. But if I want to capture this whole output in to a text file I would want to use something like ... (1 Reply)
Discussion started by: BearCheese
1 Replies

10. UNIX for Dummies Questions & Answers

Print/cut/grep/sed/ date yyyymmdd on the filename only.

I have this filename "RBD_EXTRACT_a3468_d20131118.tar.gz" and I would like print out the "yyyymmdd" only. I use this command below, but if different command like cut or print....etc. Thanks ls RBD_EXTRACT* | sed 's/.*\(........\).tar.gz$/\1/' > test.txt (9 Replies)
Discussion started by: dotran
9 Replies
Module::Refresh(3pm)					User Contributed Perl Documentation				      Module::Refresh(3pm)

NAME
Module::Refresh - Refresh %INC files when updated on disk SYNOPSIS
# During each request, call this once to refresh changed modules: Module::Refresh->refresh; # Each night at midnight, you automatically download the latest # Acme::Current from CPAN. Use this snippet to make your running # program pick it up off disk: $refresher->refresh_module('Acme/Current.pm'); DESCRIPTION
This module is a generalization of the functionality provided by Apache::StatINC and Apache::Reload. It's designed to make it easy to do simple iterative development when working in a persistent environment. It does not require mod_perl. new Initialize the module refresher. refresh Refresh all modules that have mtimes on disk newer than the newest ones we've got. Calls "new" to initialize the cache if it had not yet been called. Specifically, it will renew any module that was loaded before the previous call to "refresh" (or "new") and has changed on disk since then. If a module was both loaded for the first time and changed on disk between the previous call and this one, it will not be reloaded by this call (or any future one); you will need to update the modification time again (by using the Unix "touch" command or making a change to it) in order for it to be reloaded. refresh_module_if_modified $module If $module has been modified on disk, refresh it. Otherwise, do nothing refresh_module $module Refresh a module. It doesn't matter if it's already up to date. Just do it. Note that it only accepts module names like "Foo/Bar.pm", not "Foo::Bar". unload_module $module Remove a module from %INC, and remove all subroutines defined in it. mtime $file Get the last modified time of $file in seconds since the epoch; update_cache $file Updates the cached "last modified" time for $file. unload_subs $file Wipe out subs defined in $file. BUGS
When we walk the symbol table to whack reloaded subroutines, we don't have a good way to invalidate the symbol table properly, so we mess up on things like global variables that were previously set. SEE ALSO
Apache::StatINC, Module::Reload COPYRIGHT
Copyright 2004,2011 by Jesse Vincent <jesse@bestpractical.com>, Audrey Tang <audreyt@audreyt.org> This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> perl v5.12.4 2011-10-26 Module::Refresh(3pm)
All times are GMT -4. The time now is 02:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy