I got rather bored so i decided to create a script that creates a countdown, and shows hours:minutes:seconds till that time.
It works fine until the seconds of the actual time reaches 8, then it tries to use it to work out the difference as in "SECONDDIFF=$[SECOND-ALARMSECOND]"
Here's my code where I get the problem :
The line i get the error at is SECONDDIFF=$[SECOND-ALARMSECOND] and
The error i'm getting is :
/bin/TermTime (unstable): line 35: 08: value too great for base (error token is "08")
I simply cannot even guess how to fix this, i simply have no idea, Help me please someone?
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)