10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am writing a small unix command to substract one month from the MonthID.
If MonthID = 201301 the below script returns me 201212
if ] then
a=`echo $monthid | cut -c1-4`
b=`expr $a - 1`
c=12
echo "$b$c"
else
a=`echo $monthid | cut -c5-6`
b=`expr $a - 1`
c=`echo $monthid | cut... (4 Replies)
Discussion started by: pinnacle
4 Replies
2. Shell Programming and Scripting
I have below file which contain the date in column 3,4,5
12345 open 10/10/13 10:08 PM 3 application is in java
67899 open 12/10/13 2:31 AM 2 apps can be reach
23456 open 11/9/13 2:31 AM 4 java is OK
65432 open 12/10/13 10:07 PM 9 we are... (1 Reply)
Discussion started by: vijay_rajni
1 Replies
3. Shell Programming and Scripting
Hello all,
I'm in the process of writing a script, and I need to be able to add columns of time in the following format (time elapsed Net Backup logs):
000:01:03
000:00:58
000:00:49
Does anyone have a way of converting and/or adding timestamps such as these accurately?
Thanks in... (9 Replies)
Discussion started by: LinuxRacr
9 Replies
4. Shell Programming and Scripting
Dear all, I need your help. I have file input like this:
input.txt:
R1031 50111G1
R1031 50121G1
R1031 50131G1
R1031 50141G1
R1031 50151G1
.
.
.
.
Desired output:
10315011 = G,
10315012 =... (2 Replies)
Discussion started by: attila
2 Replies
5. Ubuntu
Hi,
Commands ps -A include four parameters are PID, TTY, TIME and CMD. I can not found pathnames of TTY and TIME which I can read from file in C language to get information display on screen. Thank you!
Ex:
PID TTY TIME CMD
1 ? 00:00:01 init (2 Replies)
Discussion started by: newbie_member
2 Replies
6. Shell Programming and Scripting
Hi everyone,
I have a file containing one column and I want to subtract the first value (value of first line) from each line's value.
79304
99299
119294
139289
159284
179279
199274
219269
239264
259259
279254
299249
319244
339239
359234I tried working on an awk solution with... (1 Reply)
Discussion started by: ink_LE
1 Replies
7. AIX
I've start and end time in two columns. How can I substract time from column 2 and column 1 and receive output in another file 'd' ?
Code:
$ cat c
12:55:04 2:03:56
2:03:56 3:20:17
14:00:00 13:05:00 (1 Reply)
Discussion started by: alps0206
1 Replies
8. Shell Programming and Scripting
Please guide if you know how to solve this.
I have a tab delimited INPUT FILE where each record is separated by -----
-----
ABC 4935402 4936680 Pattern=Cheers07080.1
ABC 4932216 4932368 Pattern=Cheers07080.1
ABC 4931932 4932122 ... (8 Replies)
Discussion started by: sam_2921
8 Replies
9. UNIX for Dummies Questions & Answers
We have a list of files (raw and jpeg types) with 2 different extensions (rw2 and jpg).
When there is both the raw and jpeg files, their file numbers must be the same (215 and 215, 218 and 218).
Sometimes there is only the jpeg file (216,217).
bla_215.rw2
bla_215.jpg
bla_216.jpg
bla_217.jpg... (9 Replies)
Discussion started by: Epictete
9 Replies
10. Shell Programming and Scripting
#!/bin/ksh
month=`date | cut -c5-8`
year=`date | cut -c24-28`
echo "$month"
echo "$year"
--- This gives me output as Feb and 2009
but now I want to substract the 1 month from the current script and want output as
Jan 2009.
Please note I have searched a lot on forum and found... (5 Replies)
Discussion started by: niceboykunal123
5 Replies