Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

zero(7) [hpux man page]

zero(7) 						 Miscellaneous Information Manual						   zero(7)

NAME
zero - /dev/zero special file DESCRIPTION
is a zero special file. Reads from a zero special file always return characters whose value is 0 ( characters). Data written on a zero special file is discarded or ignored. Seeks on a zero special file always succeed. When is memory mapped by calling the associated memory object behaves as a object. It is initialized to all zeros. Writes to the object modify the contents of the object which are observed by subsequent reads to this object. Both and are allowed. When it is mapped shared, the memory object can be shared only with the descendants of the current process. Modifications made to the object are visible only to the process and its descendants. When it is mapped private, any modifications done after are visible only to the process. EXAMPLES
In the following example, the buffer is filled with characters. In the following example, the process now has a range of characters at memory location FILES
SEE ALSO
mmap(2), null(7). zero(7)

Check Out this Related Man Page

shm_unlink(3)						     Library Functions Manual						     shm_unlink(3)

NAME
shm_unlink - Removes a shared memory object created by a call to the shm_open function (P1003.1b) LIBRARY
Realtime Library (librt.so, librt.a) SYNOPSIS
#include <sys/mman.h> int shm_unlink ( const char *name); PARAMETERS
*name Points to the name of the shared memory object. DESCRIPTION
The shm_unlink function removes the name of the shared memory object pointed to by name. If this file descriptor is used by other func- tions, all references to the shared memory object are removed, but content removal is delayed until all open and mapped references to the shared memory object are removed. RETURN VALUES
On a successful call to the shm_unlink function, a value of 0 (zero) is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
The shm_unlink function fails under the following conditions: [EACCES] Permission to unlink the shared memory object is denied. [ENAMETOOLONG] The length of the name argument exceeds PATH_MAX, or a pathname component is longer than NAME_MAX while _POSIX_NO_TRUNC is in effect. [ENOENT] The named shared memory object does not exist. RELATED INFORMATION
Functions: close(2), mmap(2), munmap(2), shm_open(3) Guide to Realtime Programming delim off shm_unlink(3)
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Addition with the prefixing zeros included

Hi I need to do an add function but it should include the prefixed zeros For Example i=00123 j=`expr $i + 1` The output it shows is 124 but I want the output to be 00124 Could any one help me finding out how to do this Thanks (16 Replies)
Discussion started by: sivasenthil_k
16 Replies

2. Shell Programming and Scripting

How to trim the leading zeroes in a Currency field ?

How do I trim the leading zeroes, and (+,-) in the currency field ? I have a text file. Your bill of +00002780.96 for a/c no. 25287324 is due on 11-06. Your bill of +00422270.48 for a/c no. 28931373 is due on 11-06. I want the O/P file to be like. Your bill of 2780.96 for a/c no. 25287324... (22 Replies)
Discussion started by: Amruta Pitkar
22 Replies

3. Shell Programming and Scripting

How to delete trailing zeros from a variable

Hi All I want to delete trailing zeros from varible. ex: if variable value is 1234.567000 result as 1234.567 if variable has 1234.0000 result as 1234 if variable as abcd.fgh result as abcd.fgh Can somone give me a solution using awk? (16 Replies)
Discussion started by: Chandu2u
16 Replies

4. Shell Programming and Scripting

Removing Zeros in front of a number

Hi All, I would like to trim the following input. My condition is as long as there's a zero on the left of the number, remove the zeros. Can anybody help me by using sed or awk ? Eg: 0011 => change to => 11 0333 => change to => 333 4444 => No change => 4444 (13 Replies)
Discussion started by: Raynon
13 Replies

5. Shell Programming and Scripting

Help needed in padding leading zeros

Hi all, I have file with numeric values. I need to pad each value with leading zeros such that total lenght of each value is 16. Example: cat tmp.txt 502455 50255 5026 5027 5028 Output 0000000000502455 0000000000050255 0000000000005026 0000000000005027 0000000000005028 Any... (12 Replies)
Discussion started by: jakSun8
12 Replies

6. Shell Programming and Scripting

Adding Leading Zero with Right Justified and Removing Duplicates

hello everyone. I'm hoping someone can help me out here. I have 2 files. It looks like this: File 1: abc1, defg, 50.00, mno,990 abc2, cats, 100.00, pops,991 abc3, dogs, 1.00, treat,992 File 2: 990, airplanes, runway, doctor 991, jets, birds, much 990,... (13 Replies)
Discussion started by: crazyhpux
13 Replies

7. Shell Programming and Scripting

Remove leading zeroes in 2nd field using sed

Hi Forum. I tried searching the forum but couldn't find a solution for my question. I have the following data and would like to have a sed syntax to remove the leading zeroes from the 2nd field only: Before: 2010-01-01|123|1|1000|2000|500|1500|600|700... (18 Replies)
Discussion started by: pchang
18 Replies

8. Shell Programming and Scripting

Finding multiple zero's in a file

Hi all, i have a text file like the below example--- 146 7600 147 23996 43024 50700581 28998 1767165 10 3784 12 1344 0 0 0 545 641 166646 723 90136 24 1046 46 2948 OR 4340 ... (15 Replies)
Discussion started by: gemnian.g
15 Replies

9. Shell Programming and Scripting

Comparison treating strings as zero integers

I'm trying to write a bash script to perform basic arithmetic operations but I want to run a comparison on the arguments first to check that they're a number greater than zero. I want an error to pop up if the arguments args aren't >= 0 so I have: if ! ]; then echo "bad number: $1" fi ... (14 Replies)
Discussion started by: TierAngst
14 Replies

10. Shell Programming and Scripting

Help deleting leading zeros in a file

I have a list of numbers extracted and need to delete the leading zeros from them, but when i do so, the command I am using also deletes numbers that end in Zero as well. eg 10, 20, 30, etc this is part of a larger script and the only way I can think of is to try and detect the 10,20 30 etc in... (19 Replies)
Discussion started by: kcpoole
19 Replies

11. Shell Programming and Scripting

Fill in missing rows with zero to have uniform table

Hello, I have two files of same structure except some rows are missing randomly in each file. How do I fill the missing rows to have the exact ID column (S01 ~ S96) and rest columns filled with "0" with awk? The purpose of this step is to join the two files side by side. The closest thread is... (17 Replies)
Discussion started by: yifangt
17 Replies

12. Shell Programming and Scripting

awk calculation with zero as N/A

In the below awk, I am trying to calculate percent for a given id. It is very close the problem is when the # being used in the calculation is zero. I am not sure how to code this condition into the awk as it happens frequently. The portion in italics was an attempt but that lead to an error. Thank... (13 Replies)
Discussion started by: cmccabe
13 Replies

13. Shell Programming and Scripting

Adding Leading Zeros for date in a file

Hello, I have a pipe separated file with two major lines. One is header and another is detail line. Header starts with H and Detail start with D. Sample Content: H|123456|Joes Watson|UK|4/5/2016|12/5/2016|3456|HC|NW|||||| D|123456|Joes... (13 Replies)
Discussion started by: Mannu2525
13 Replies

14. UNIX for Beginners Questions & Answers

Compare sum of two columns if variance is zero do nothing else send an email

11☺Hi, I have to data sets: One is in .txt format and other is in .csv format, please refer below two outputs from two files. File1.txt SOURCE PAYDATE TOTAL_DOLLARS RECORD_COUNT ASSET 05/25/2018 247643.94 ASSET 06/20/2018 ... (27 Replies)
Discussion started by: Tahir_M
27 Replies