10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to keep last 2 days data from a file and want to delete others data from the file. Please help me.
Sample Input
# cat messages-2
Apr 15 11:25:03 test1 kernel: imklog 4.6.2, log source = /proc/kmsg started.
Apr 15 11:25:03 test1 rsyslogd: (re)start
Apr 16 19:42:03 test1 kernel:... (2 Replies)
Discussion started by: makauser
2 Replies
2. Shell Programming and Scripting
I have a header-detail file that goes like this:
SHP00288820131021110921
ORDER0156605920131021110921INMMMMFN
DETAIL0004 4C2Z 10769 AAFC 0000009600000094 4C2Z 10769 AAFC 0000672107 OIL
DETAIL0002 ER3Z 14300 E 0000001300000012 ER3Z 14300 E 0000672107 OIL... (3 Replies)
Discussion started by: rbaggio666
3 Replies
3. Shell Programming and Scripting
Hi All,
I have following listing
Filesystem GB blocks Free Used Iused Iused Mounted on
/dev/hd2 4.00 0.31 93 63080 43 /usr
Filesystem GB blocks Free Used Iused Iused Mounted on
Filesystem GB blocks Free Used Iused Iused... (11 Replies)
Discussion started by: ckwan
11 Replies
4. Shell Programming and Scripting
Hi,
Can any one help me, in deleting the records from the database table based on the following condition:
script should take a configurable parameter as input. The input is nothing but “no. of years”.
For example, if I enter 2 as input parameter, then the 2 year old records should get... (2 Replies)
Discussion started by: zxcjggu708
2 Replies
5. UNIX for Dummies Questions & Answers
hi
i have my input data like this
aaa bbb ccc
asa dff nmj
mnj saa dff
oik
aax cdx saa
oik
asq sdf dssi want my output file to be like this
mnj saa dff oik
aax cdx saa oiki want to retain only those lines which will have oik just below them and i want oik to be as next column to those... (1 Reply)
Discussion started by: anurupa777
1 Replies
6. Shell Programming and Scripting
hi
my problem is little complicated one. i have 2 files which appear like this
file 1
abbsss:aa:22:34:as akl abc 1234
mkilll:as:ss:23:qs asc abc 0987
mlopii:cd:wq:24:as asd abc 7866
file2
lkoaa:as:24:32:sa alk abc 3245
lkmo:as:34:43:qs qsa abc 0987
kloia:ds:45:56:sa acq abc 7805
i... (5 Replies)
Discussion started by: anurupa777
5 Replies
7. Shell Programming and Scripting
I have a set of data as below:
The first field, $1 represent "|".
The $3 (3rd field) and $6 (6th field) in my data file represent "number-molecule" which has arrangement as below:
1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17 18 19 20 21 ... (9 Replies)
Discussion started by: vjramana
9 Replies
8. Shell Programming and Scripting
Hi,
I need to remove some lines from an XML file is the value within a tag is empty.
Imagine this scenario,
<acd><acdID>2</acdID><logon></logon></acd>
<acd><acdID></acdID><logon></logon></acd>
<acd><acdID></acdID><logon></logon></acd>
<acd><acdID></acdID><logon></logon></acd>
I... (3 Replies)
Discussion started by: giles.cardew
3 Replies
9. UNIX for Dummies Questions & Answers
I need a little help...
I have a file with 3 fields,
Time/Date, IP address, UniqueID
I have a 2nd file of UniqueIDs.
I want to either (which ever is easier):
1. delete entries in file 1 that have a UniqueID in file 2
2. create a new file with the fields from File 1, excluding the... (4 Replies)
Discussion started by: goldie363
4 Replies
10. Shell Programming and Scripting
Hello,
Can anyone pls. provide me with the command for deleting files older then 15 days with a restriction to keep at least 5 files in a directory even if they are older then 15 days.
Any help will be highly appreciated.
Thanks,
Pulkit (4 Replies)
Discussion started by: pulkit
4 Replies