07-04-2013
What trailing space? I don't see what this has to do with your original question. If this is a new problem, then please open a new thread for this.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Not sure why this thread was closed without any explanation, but you can do what you're asking with sed 's/]*$//g' < sourceFile > destFile (1 Reply)
Discussion started by: oombera
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a file like this
(ADD_MONTHS((Substr(Trim(BOTH FROM Translate(Maximum(closeDa
------------------------------------------------------------
2007-06-30 00:00:00
I have a requirement where i need just the date.
When i do: tail -1... (2 Replies)
Discussion started by: mahek_bedi
2 Replies
3. Shell Programming and Scripting
Hello, I am trying to write a script that will calculate the amount of data remaining in a storage volume. I'm running Tru64 Unix version 5.1B patch kit 6. The script is being run against an AdvFS domain. I am programming in Korn Shell version M-11/16/88f.
The basic idea is that I want to run df... (3 Replies)
Discussion started by: Heathe_Kyle
3 Replies
4. Shell Programming and Scripting
I have a string "disk0 with a trailing white space after it" but I want to get rid of this white space from right to left so that I am left with "disk0" only.
Using sed 's/ $//g' doesn't seem to work
Any ideas ?
Thanks (5 Replies)
Discussion started by: cillmor
5 Replies
5. Shell Programming and Scripting
Hi I have a simple request but can't find the answer. I want to remove trailing zeros, and in some cases the fullstops, from the input data. Example of input file:
FR002_15.000_20.000
SD475_5.000_10.500
FG5647_12.250_15.500
BH2463_30.555_32.000
Desired output file would be:
... (10 Replies)
Discussion started by: theflamingmoe
10 Replies
6. Shell Programming and Scripting
Hi Freinds,
I have file1.txt as below
file1.txt
1521894~~-0.400~201207
1521794~~-0.486~201207
152494~~-0.490~201207
152154894~~-0.490~201207
1521894354~~-0.489~201207
expected output :
1521894~~-0.4~201207
1521794~~-0.486~201207
152494~~-0.49~201207... (9 Replies)
Discussion started by: i150371485
9 Replies
7. Shell Programming and Scripting
Platform : RHEL 5.8
I want to end each line of this file with a single quote.
$ cat hello.txt
blueskies
minnie
mickey
gravity
snoopyAt VI editor's command mode, I have used the following command to replace the last character with a single quote.
~
~
~
:%s/$/'/gNow, the lines in the... (10 Replies)
Discussion started by: John K
10 Replies
8. Shell Programming and Scripting
I have some strings such as
ABC1
ABC2
TYFASDD12
They will only have letters and numbers. In each case I want to remove the last digit? The lengths will vary. So a hard coded substr won't work. What do I do?
if it doesn't end in a number, I don't want to remove any characters. (6 Replies)
Discussion started by: guessingo
6 Replies
9. Shell Programming and Scripting
I have a folder that contains many sub folders and files. This tree has to be backed up to an archive system. According to the tech support, one of the archives is failing to back up due to the possibility of trailing spaces on file and folder names. Therefore, I would like to have a script... (16 Replies)
Discussion started by: vipertech
16 Replies
10. Shell Programming and Scripting
Hi,
I have simply made a shell script to convert *.csv to *.xml file. Xml file is required for input to one tool. But i am getting space after last field. How can i remove it.
Shell script is as follows :-
if
then
echo ""
echo "Wrong syntax, Databse_update.sh... (6 Replies)
Discussion started by: stillrules
6 Replies
LEARN ABOUT DEBIAN
minherit
MINHERIT(2) BSD System Calls Manual MINHERIT(2)
NAME
minherit -- control the inheritance of pages
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sys/mman.h>
int
minherit(void *addr, size_t len, int inherit);
DESCRIPTION
The minherit() system call changes the specified pages to have the inheritance characteristic inherit. Not all implementations will guaran-
tee that the inheritance characteristic can be set on a page basis; the granularity of changes may be as large as an entire region. FreeBSD
is capable of adjusting inheritance characteristics on a page basis. Inheritance only effects children created by fork(). It has no effect
on exec(). exec'd processes replace their address space entirely. This system call also has no effect on the parent's address space (other
than to potentially share the address space with its children).
Inheritance is a rather esoteric feature largely superseded by the MAP_SHARED feature of mmap(). However, it is possible to use minherit()
to share a block of memory between parent and child that has been mapped MAP_PRIVATE. That is, modifications made by parent or child are
shared but the original underlying file is left untouched.
INHERIT_SHARE This option causes the address space in question to be shared between parent and child. It has no effect on how the original
underlying backing store was mapped.
INHERIT_NONE This option prevents the address space in question from being inherited at all. The address space will be unmapped in the
child.
INHERIT_COPY This option causes the child to inherit the address space as copy-on-write. This option also has an unfortunate side effect
of causing the parent address space to become copy-on-write when the parent forks. If the original mapping was MAP_SHARED, it
will no longer be shared in the parent after the parent forks and there is no way to get the previous shared-backing-store
mapping without unmapping and remapping the address space in the parent.
RETURN VALUES
The minherit() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indi-
cate the error.
ERRORS
The minherit() system call will fail if:
[EINVAL] The virtual address range specified by the addr and len arguments is not valid.
[EACCES] The flags specified by the inherit argument were not valid for the pages specified by the addr and len arguments.
SEE ALSO
fork(2), madvise(2), mincore(2), mprotect(2), msync(2), munmap(2), rfork(2)
HISTORY
The minherit() system call first appeared in OpenBSD and then in FreeBSD 2.2.
BUGS
Once you set inheritance to MAP_PRIVATE or MAP_SHARED, there is no way to recover the original copy-on-write semantics short of unmapping and
remapping the area.
BSD
October 30, 2007 BSD