8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a data in a file called SCHED which has 5 columns: sched no, date, time, place and remarks. The image is shown below.
http://dl.dropbox.com/u/54949888/Screenshot%20from%202013-01-02%2002%3A42%3A25.png
Now, I want to display only the schedules which fall under a certain date range which... (2 Replies)
Discussion started by: angilulu
2 Replies
2. Shell Programming and Scripting
I have a huge matrix file which looks like this (example matrix):
1 2 3 5
4 5 6 7
7 6 8 9
1 2 4 2
7 6 5 1
3 2 1 9
As one can see, this matrix has 4 columns and 6 rows. But my original matrix has some 3 million rows and 6000 columns.
For example, on this matrix I can define my task as... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
3. Shell Programming and Scripting
Hi guys,
I have been trying to create a list of dates from a certain range, ie.
range from 01011950 to 31122000
But when my below code reaches certain dates, it comes up with a;
'date: invalid date 'yyyy-mm-dd -d 1day'
Sofar I have come up with the following, slow and ugly;
... (4 Replies)
Discussion started by: TAPE
4 Replies
4. UNIX for Dummies Questions & Answers
Two related questions;
1. how do i select the nth file in a directory?
2. how do i select a range of files, say 2nd-5th?
I have done the following but I don't think the solution is a neat one.
Query 1: select nth file - say 3rd file;
#!/bin/bash
touch foo1 foo2 foo3 foo4 foo5 foo6... (1 Reply)
Discussion started by: Muhammad Rahiz
1 Replies
5. Shell Programming and Scripting
Need to pull from a range of dates/times (ex. 6:00 AM March 3 through 6:00 AM March 4) from a folder and put those file names in a new file to process later. Dates would not be hard dates but dates from the folder directory, how would I do that? (9 Replies)
Discussion started by: freddie999
9 Replies
6. Shell Programming and Scripting
hi all,
here is the description to my problem.
input parameters: $date1 & $date2
based on the range i need to select the archived files from the archived directory and moved them in to working directory.
can u please help me in writing the code to select the multiple files based on the... (3 Replies)
Discussion started by: bbc17484
3 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I have a requirement to display all the dates within the provided (through user input) date range.
For eg: If I enter 28012009 (as From date in the format 'DDMMYYYY') and 02022009(as To date in the format 'DDMMYYYY'), the output should be all dates occuring between the from and to... (11 Replies)
Discussion started by: sunpraveen
11 Replies
8. UNIX for Advanced & Expert Users
Hi,
I need to select the entries between two dates from an Oracle db. The Oracle db has a column with Unix timestamps. I use the following querry, but it doesnt seem to be working as desired.
select count(*) from reporter_status where to_char(FIRSTOCCURRENCE, 'mm-dd-yy') between ('08-07-06')... (1 Reply)
Discussion started by: amitsayshii
1 Replies
FAST_DIVIDE32(3) BSD Library Functions Manual FAST_DIVIDE32(3)
NAME
fast_divide32, fast_divide32_prepare, fast_remainder32 -- fast 32bit division and remainder
SYNOPSIS
#include <sys/bitops.h>
uint32_t
fast_divide32(uint32_t v, uint32_t div, uint32_t m, uint8_t s1, uint8_t s2);
uint32_t
fast_remainder32(uint32_t v, uint32_t div, uint32_t m, uint8_t s1, uint8_t s2);
void
fast_divide32_prepare(uint32_t div, uint32_t *m, uint8_t *s1, uint8_t *s2);
DESCRIPTION
The fast_divide32 and fast_remainder32 functions compute the equivalent of v / div and v % div using optimised CPU instructions. The con-
stants m, s1, and s2 must first be preset for a given value of div with the fast_divide32_prepare function.
RATIONALE
These functions are useful for inner loops and other performance-sensitive tasks. The functions expand to code that is typically slightly
larger than a plain division instruction, but requires less time to execute. The code for constant div arguments should be equivalent to the
assembly created by GCC.
EXAMPLES
The following example computes q = a / b and r = a % b:
uint32_t a, b, q, r, m;
uint8_t s1, s2;
fast_divide32_prepare(b, &m, &s1, &s2);
q = fast_divide32(a, b, m, s1, s2);
r = fast_remainder32(a, b, m, s1, s2);
SEE ALSO
bitops(3), div(3), remainder(3)
Torbjorn Granlund and Peter L. Montgomery, "Division by Invariant Integers Using Multiplication", ACM SIGPLAN Notices, Issue 6, Volume 29,
http://gmplib.org/~tege/divcnst-pldi94.pdf, 61-72, June 1994.
HISTORY
The fast_divide32 function appeared in NetBSD 6.0.
BSD
May 10, 2011 BSD