I have a problem that I want to insert and delete some chars in the middle of a file. fopen() and fdopen() just allow to append at the end.
Is there any simple method or existing library that allow these actions? Thanks in advance.:confused: (7 Replies)
I am trying to strip out certain characters from a string on both (left & right) sides. For example, line=see@hear|touch, i only want to echo the "hear" part. Well i have tried this approach:
line=see@hear|touch
templine=${line#*@} #removed "see@"
echo ${templine%%\|*} #removed... (4 Replies)
Hi All,
I have a file which is delimeted with the character '. i need to replace this character with the same character and also a new line.
Can anyone please help me with the tr command for this.
Many thanks
Karan (11 Replies)
Hello,
I have a file with many lines with below format:
\abc\\1234
jkl\\567
def\\345
\pqr\\567
\xyz\\234
Here, i need to do 2 things.
1. replace \\ with \
2. remove starting \
so output to be as below: (11 Replies)
Hi fellow experts,
I have a question for you. Data looks like:
00877,05/13/2010,PBO,P,0000708331,518
00877,05/13/2010,PBO,P,0000708331,519
...
...
00877,05/13/2010,PBO,P,0000708331,2103
00877,05/13/2010,PBO,P,0000708331,2104,etc,etc
Basically I have to replace 518,519,2103,2104,... (4 Replies)
sed -e "s// /g" old.txt > new.txt
While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
Hi,
I have a text file which is output from a server and it lists all the files in a specific volume. However, the volume name appears as volume_name:.
I would like to replace this with \\volume_name\volume_name. This is not a problem in itself as I can use sed to globally look for the... (8 Replies)
Hi,
I need to correct href portion of the lines to edit out spaces from the line starting with position "<a href=" and ending at "target="
Below are 2 examples of extra space added by the server:
<td width=251 colspan=9 rowspan=22> <font size=2 face="courier"><tt><style>{font:7pt Courier ... (4 Replies)
Discussion started by: friedmi
4 Replies
LEARN ABOUT MOJAVE
zprint
ZPRINT(1) BSD General Commands Manual ZPRINT(1)NAME
zprint -- show information about kernel zones
SYNOPSIS
zprint [-cdhlLstw] [name]
DESCRIPTION
zprint displays data about Mach zones (allocation buckets). By default, zprint will print out information about all Mach zones. If the
optional name is specified, zprint will print information about each zone for which name is a substring of the zone's name.
zprint interprets the following options:
-c (Default) zprint prints zone info in columns. Long zone names are truncated with '$', and spaces are replaced with '.', to allow
for sorting by column. Pageable and collectible zones are shown with 'P' and 'C' on the far right, respectively. Zones with pre-
posterously large maximum sizes are shown with '----' in the max size and max num elts fields.
-d Display deltas over time, showing any zones that have achieved a new maximum current allocation size during the interval. If the
total allocation sizes are being displayed for the zones in question, it will also display the deltas if the total allocations
have doubled.
-h (Default) Shows headings for the columns printed with the -c option. It may be useful to override this option when sorting by
column.
-l (Default) Show all wired memory information after the zone information.
-L Do not show all wired memory information after the zone information.
-s zprint sorts the zones, showing the zone wasting the most memory first.
-t For each zone, zprint calculates the total size of allocations from the zone over the life of the zone.
-w For each zone, zprint calculates how much space is allocated but not currently in use, the space wasted by the zone.
Any option (including default options) can be overridden by specifying the option in upper-case; for example, -C overrides the default option
-c.
DIAGNOSTICS
The zprint utility exits 0 on success, and >0 if an error occurs.
SEE ALSO ioclasscount(1), lsmp(1), lskq(1),
Mac OS X 2 May 2016 Mac OS X