10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello All,
I am a newbie to unix shell scripting and need to write a script that displays the difference between two variables that stores date value.
For example,
F1=`ls -ltr file1* | tail -1 |tr -s ' ' |cut -d' ' -f6,7,8`
F2=`ls -ltr file2* | tail -1 |tr -s ' ' |cut -d' ' -f6,7,8`
F1... (3 Replies)
Discussion started by: priyaa2010
3 Replies
2. Shell Programming and Scripting
I have dates as follows in a file
20121029135649
20121029135721
20121030091540
20121030093420
20121030094340
20121030095427
20121030095856
20121030100104
20121030100251
All these dates are in sorted order. I need to find out the difference between the dates as follows
2nd row... (6 Replies)
Discussion started by: meetsriharsha
6 Replies
3. Shell Programming and Scripting
Hello all .
I have two arrays.
${ARRAY_MOUNT_POINT_CAPACITY}
${ARRAY_MOUNT_POINT_CAPACITY}.
Whats the synatx of subtracting their values , placing them in variable V1 and then echoeing it ???
Ive tried expr and let ...gives me ./test_code.sh: difference: bad number (3 Replies)
Discussion started by: Junaid Subhani
3 Replies
4. Shell Programming and Scripting
Hi Guru's
i have a file which contains data as below(file.txt) and an inital value 8725
403
352
462
359
317
347
414
285
308
350
300
305
381
319
373
358 (11 Replies)
Discussion started by: Gaurav198
11 Replies
5. Shell Programming and Scripting
Hello
I am using a ksh shell on solaris 9.
I am looking for a way to subtract two files and get a number
The first file contains only lines
LINE_A
LINE_B
LINE_C
The second file contain one number, the number of the line
Example
1
So the idea is to... (1 Reply)
Discussion started by: Aswex
1 Replies
6. Shell Programming and Scripting
HI gurus...
I have a PERL file that help me extract the date and time
of the file.
The format of this is: yyyymmddhhmmss.
Example:
20100430070935 (April 30 2010 07:09:35)
How can i subtract the acquired time from system's time..??
The answer... (6 Replies)
Discussion started by: bankimmehta
6 Replies
7. Shell Programming and Scripting
Hallo all i am trying to execute this script ...............
But this is throwing the error......
use of uninitialized value in subtraction in at icd_convert.pl line 156
use of uninitialized value in subtraction in at icd_convert.pl line 157
use of uninitialized value in subtraction in at... (1 Reply)
Discussion started by: suvenduperl
1 Replies
8. Shell Programming and Scripting
hi,
i set up a script on my server to do a particular task once files from an external system are ftpd in the format compaq_20100110 (YYDDMM). Interestingly, the source of ftp is sending the files in the format e.g 20100109 i.e. previous date and for some reason this fails.kindly see my script... (2 Replies)
Discussion started by: bigtejus
2 Replies
9. Shell Programming and Scripting
hi i have file 1 as follows:
6
7
8
9
10
i have file 2 as follows:
5
5
5
5
5
i want file 3 as follows: (4 Replies)
Discussion started by: npatwardhan
4 Replies
10. UNIX for Dummies Questions & Answers
hi gurus!
i realize that my question shows my stupidness, but i need your help!
i have:
s_date=`date +%m-%d-%Y_%I%p`
variable and i need the same, but minus one hour..
what i made:
s_date=time(`date +%m-%d-%Y_%I%p`) - 3600
but i'm getting:
daily_exports.sh: line 20: syntax error near... (4 Replies)
Discussion started by: MarGur
4 Replies