This is the body of the code i use (been updated with the '((' that you recomended)
It cycles through that, updating every second, but when SECONDS reaches 08, it exits with the following error :
/bin/TermTime (unstable): line 33: 08: value too great for base (error token is "08")
I have tried setting the SECONDS variable in the form :
if [ $SECONDS = 8 ]; then
SECONDS=8
fi
Didn't expect it to work and it didn't, but i thought i would try it
The strange thing is that i don't think it does this with MINUTES or HOURS, just SECONDS...
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
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)