Hi,
I am currently trying to generate multiple random numbers in C for different variable:-
die1=1+(rand()%5);
die2=1+(rand()%5);
die3=1+(rand()%5);
die4=1+(rand()%5);
But I need to contrain the total of die1, die2,die3 and die4 to be 5 as well. If i insert die1+die2+die3+die4=5, i do... (6 Replies)
Hi i would like to add line numbers to end of each line in a file.
I am able to do it in the front of each line using sed, but not able to add at the end of the file.
Can anyone suggest
The following code adds line number to start of each line
sed = filename | sed 'N;s/\n/\t/'
how can i... (5 Replies)
I have two files one (numbers file)contains the numbers(approximately 30000) and the other file(record file) contains the records(approximately 40000)which may or may not contain the numbers from that file.
I want to seperate the records which has the field 1=(any of the number from numbers... (15 Replies)
I have to take a list of numbers from the keyboard and not by passing arguments. How will I read a set of numbers in such a way that I can use any number I wish to operate upon. Is there any specific command to do so. As said before I dont want to pass the numbers as arguments from command line.... (3 Replies)
Hi! I'm trying to assign line numbers to each line of the file
for example consider the following..
The contents of the input file are
hello how are you?
I'm fine.
How about you?
I'm trying to get the following output..
1 hello how are you?
2 I'm fine.
3 How about you? ... (8 Replies)
Hi,
I have a situation to compare one file, say file1.txt with a set of files in directory.The directory contains more than 100 files.
To be more precise, the requirement is to compare the first field of file1.txt with the first field in all the files in the directory.The files in the... (10 Replies)
Hi All,
I have one sensor output(over the same) for a set value of 20.
Time(in Sec), Data
1, 16
2, 20
3, 24
4, 22
5, 21
6, 20
7, 19.5
8, 20
9, 20.5
10, 20
11, 20
12, 19.5
Here we can see like after 5 sec of time the data value reaches to 20+-0.5 range.
So I... (7 Replies)
Hi Experts,
I have a data with multiple entry , I want to filter PKG= & the last column "00060110" or "00088150" in the output
file:
###############################################################################################
PKG= P8SDB :: VGS = vgP8SOra vgP8SDB1 vgP8S001... (5 Replies)
STRUCT CMBDATA(9) The ccw bus STRUCT CMBDATA(9)NAME
struct_cmbdata - channel measurement block data for user space
SYNOPSIS
struct cmbdata {
__u64 size;
__u64 elapsed_time;
__u64 ssch_rsch_count;
__u64 sample_count;
__u64 device_connect_time;
__u64 function_pending_time;
__u64 device_disconnect_time;
__u64 control_unit_queuing_time;
__u64 device_active_only_time;
__u64 device_busy_time;
__u64 initial_command_response_time;
};
MEMBERS
size
size of the stored data
elapsed_time
time since last sampling
ssch_rsch_count
number of ssch and rsch
sample_count
number of samples
device_connect_time
time of device connect
function_pending_time
time of function pending
device_disconnect_time
time of device disconnect
control_unit_queuing_time
time of control unit queuing
device_active_only_time
time of device active only
device_busy_time
time of device busy (ext. format)
initial_command_response_time
initial command response time (ext. format)
DESCRIPTION
All values are stored as 64 bit for simplicity, especially in 32 bit emulation mode. All time values are normalized to nanoseconds.
Currently, two formats are known, which differ by the size of this structure, i.e. the last two members are only set when the extended
channel measurement facility (first shipped in z990 machines) is activated. Potentially, more fields could be added, which would result in
a new ioctl number.
AUTHOR
Cornelia Huck <cornelia.huck@de.ibm.com>
Author.
COPYRIGHT Kernel Hackers Manual 2.6. July 2010 STRUCT CMBDATA(9)