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. UNIX for Dummies Questions & Answers
Currently, I have a print filter that takes a text file, that convert it into PCL which then gets to a HP printer. This works.
Now I need to embedded a image file within the text file.
I'm able to convert the image file into PCL and I can cat both files together to into a single document... (1 Reply)
Discussion started by: chedlee88-1
1 Replies
3. 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
4. Shell Programming and Scripting
Hi,
I have a problem where I need to make this input:
nameRow1a,text1a,text2a,floatValue1a,FloatValue2a,...,floatValue140a
nameRow1b,text1b,text2b,floatValue1b,FloatValue2b,...,floatValue140b
look like this output:
nameRow1a,text1b,text2a,(floatValue1a - floatValue1b),(floatValue2a -... (4 Replies)
Discussion started by: nricardo
4 Replies
5. 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
6. Shell Programming and Scripting
abc.dat
tty cpu
tin tout us sy wt id
0 0 7 3 19 71
extended device statistics
r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device
0.0 133.2 0.0 682.9 0.0 1.0 0.0 7.2 0 79 c1t0d0
0.2 180.4 0.1 5471.2 3.0 2.8 16.4 15.6 15 52 aaaaaa1-xx
I want to skip first 5 line... (4 Replies)
Discussion started by: kchinnam
4 Replies
7. Solaris
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' ?
$ 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