10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Below is the sample logfile:
Userids Date Time
acb Checkout time: 2013-11-20 17:00
axy Checkout time: 2013-11-22 12:00
der Checkout time: 2013-11-17 17:00
xyz Checkout time: 2013-11-19 16:00
ddd Checkout time: 2013-11-21 16:00
aaa Checkout... (9 Replies)
Discussion started by: asjaiswal
9 Replies
2. 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
3. UNIX for Dummies Questions & Answers
Hi,
To load a big file in a table,I have a make sure that all rows in the file has same number of the columns .
So in my file if I am getting any rows which have columns not equal to 6 , I need to delete it . Delimiter is space and columns are optionally enclosed by "".
This can be ... (1 Reply)
Discussion started by: hemantraijain
1 Replies
4. Shell Programming and Scripting
HI,
i have a file like this
t.txt
f1|_f2|_
f1|_f2|_
f1|_f2|_
as if col delimiter is |_ and row delimiter |_\n
trying to count number of records using awk
$ awk 'BEGIN{FS="|_" ; RS="~~\n"} {n++}END{print n} ' t.txt
7
wondering how can i count this to 3 ?
thx (9 Replies)
Discussion started by: aksforum
9 Replies
5. Shell Programming and Scripting
I want to develop a shell script but with a bit complicated conditions. I have a file contains a data. The data change every 5 mins.
If the file having data repeated 3 times then add 5 to the counter. By using crontab I will let the script check the file again and if the same 3 data are exist... (2 Replies)
Discussion started by: Bluetoot
2 Replies
6. Shell Programming and Scripting
Hi every one;
I have a 31500-line text file upon which two following tasks are to be performed:
1: Rearranging the file
2: Taking the average of each column (considering number of zeros) and output the result into a new file
This is the code I've come up with:
awk '(NR%3150<3150)... (0 Replies)
Discussion started by: nxp
0 Replies
7. Shell Programming and Scripting
Hi,
Please help me in counting the below records(1st field) from samplefile:
Expected output:
Count Descr
-------------------------------------------
7 Mean manager
14 ... (7 Replies)
Discussion started by: prashant43
7 Replies
8. Shell Programming and Scripting
I've been working with an awk script and I'm wondeing id it's possible to count records in a file which DO NOT contain, in this instance fields 12 and 13.
With the one script I am wanting to display the count for the records WITH fields 12 and 13 and a seperate count of records WITHOUT fields... (2 Replies)
Discussion started by: Glyn_Mo
2 Replies
9. Shell Programming and Scripting
Hi All,
I have two files say file1 and file2.
I want to check the number of records in file1 and if its atleast 2 (i.e., 2 or greater than 2 ) then I have to check records in file2 .If records in file2 is atleast 1 (i.e. if its not empty ) i have to set some conditions .
Could you pls... (3 Replies)
Discussion started by: mavesum
3 Replies
10. Shell Programming and Scripting
I have a flat file and need to count no of records in the file less the header and the trailer record.
I would appreciate any and all asistance
Thanks
Hadi Lalani (2 Replies)
Discussion started by: guiguy
2 Replies