Sponsored Content
Top Forums Shell Programming and Scripting Using awk to create a summary of a structured file Post 302702733 by Chubler_XL on Tuesday 18th of September 2012 07:11:29 PM
Old 09-18-2012
Is "H2" unique within the file (ie can we guarantee it will not appear in the random text).

If not can we say the last occurance of H2 within the file will be the heading line?
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Create Summary file containg information

Folks, I have multiple files in a folder containing some information (there is around 100 of them). What I would like to do would be able to import some of the information into a summary text file so that it will be easier to read a glance. The name of the files all start with the naming... (4 Replies)
Discussion started by: lodey
4 Replies

2. Shell Programming and Scripting

structured file update

Hi I have a very structured file consisting of multiple lines as follows: 3752 AVAILABLE 06/24/2009 FFFF 000000 0000 0000 3753 TRADITION (ASIA) LTD TACB 008329 0000 0000 3754 WACHOVIA CONVS/PRFDS WBCP 001099 0000 0000 3755 AVAILABLE 05/12/2009 FFFF 000000 0000 0000 3756... (3 Replies)
Discussion started by: aoussenko
3 Replies

3. Shell Programming and Scripting

Summary using awk

Displaying information using awk Hey guys, i am using awk to display my information in a certain order. Database : Persia:42:John France:50:Mabel Persia:50:Rach Germany:60:JohnMy expected output is : ... (25 Replies)
Discussion started by: gregarion
25 Replies

4. Shell Programming and Scripting

Generating summary data (use awk?)

I have a data file similar to this (but many millions of lines long). You can assume that it is totally unsorted but has no duplicate rows. Date ,Tool_Type ,Tool_ID ,Time_Used 3/13/2014,Screwdriver,Screwdriver02, 6 3/13/2014,Screwdriver,Screwdriver02,20... (2 Replies)
Discussion started by: Michael Stora
2 Replies

5. UNIX for Beginners Questions & Answers

How to create a summary file of all files in a directory sorted in reverse alphabetical order.?

I have an interactive script which works terrific at processing a folder of unsorted files into new directories. I am wondering how I could modify my script so that( upon execution) it provides an additional labelled summary file on my desktop that lists all of the files in each directory that... (4 Replies)
Discussion started by: Braveheart
4 Replies
UUID_GENERATE(3)						    Libuuid API 						  UUID_GENERATE(3)

NAME
uuid_generate, uuid_generate_random, uuid_generate_time, uuid_generate_time_safe - create a new unique UUID value SYNOPSIS
#include <uuid.h> void uuid_generate(uuid_t out); void uuid_generate_random(uuid_t out); void uuid_generate_time(uuid_t out); int uuid_generate_time_safe(uuid_t out); DESCRIPTION
The uuid_generate function creates a new universally unique identifier (UUID). The uuid will be generated based on high-quality randomness from /dev/urandom, if available. If it is not available, then uuid_generate will use an alternative algorithm which uses the current time, the local ethernet MAC address (if available), and random data generated using a pseudo-random generator. The uuid_generate_random function forces the use of the all-random UUID format, even if a high-quality random number generator (i.e., /dev/urandom) is not available, in which case a pseudo-random generator will be substituted. Note that the use of a pseudo-random genera- tor may compromise the uniqueness of UUIDs generated in this fashion. The uuid_generate_time function forces the use of the alternative algorithm which uses the current time and the local ethernet MAC address (if available). This algorithm used to be the default one used to generate UUID, but because of the use of the ethernet MAC address, it can leak information about when and where the UUID was generated. This can cause privacy problems in some applications, so the uuid_gener- ate function only uses this algorithm if a high-quality source of randomness is not available. To guarantee uniqueness of UUIDs generated by concurrently running processes, the uuid library uses global clock state counter (if the process has permissions to gain exclusive access to this file) and/or the uuidd daemon, if it is running already or can be spawned by the process (if installed and the process has enough permissions to run it). If neither of these two synchronization mechanisms can be used, it is theoretically possible that two con- currently running processes obtain the same UUID(s). To tell whether the UUID has been generated in a safe manner, use uuid_gener- ate_time_safe. The uuid_generate_time_safe is similar to uuid_generate_time, except that it returns a value which denotes whether any of the synchroniza- tion mechanisms (see above) has been used. The UUID is 16 bytes (128 bits) long, which gives approximately 3.4x10^38 unique values (there are approximately 10^80 elementary particles in the universe according to Carl Sagan's Cosmos). The new UUID can reasonably be considered unique among all UUIDs created on the local system, and among UUIDs created on other systems in the past and in the future. RETURN VALUE
The newly created UUID is returned in the memory location pointed to by out. uuid_generate_time_safe returns zero if the UUID has been generated in a safe manner, -1 otherwise. CONFORMING TO
OSF DCE 1.1 AUTHOR
Theodore Y. Ts'o AVAILABILITY
libuuid is part of the util-linux package since version 2.15.1 and is available from https://www.kernel.org/pub/linux/utils/util-linux/. SEE ALSO
uuidgen(1), uuid(3), uuid_clear(3), uuid_compare(3), uuid_copy(3), uuid_is_null(3), uuid_parse(3), uuid_time(3), uuid_unparse(3), uuidd(8) util-linux May 2009 UUID_GENERATE(3)
All times are GMT -4. The time now is 10:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy