please help in making sed singleline command
i need to insert dos new line (CR LF) before
" 34 matching device(s) found on \\cpu1."
" 6 matching device(s) found on \\cpu7."
" 102 matching device(s) found on \\mainserver."
the problem is that sometimes there are both CR LF before strings and... (1 Reply)
I have a large file that looks like the below output:
system SUNWxwmod X Window System kernel modules
system SUNWxwoft X Window System optional fonts
system SUNWxwopt X Window System Optional Clients
system ... (1 Reply)
Hi !
I'm rather new with sed ... learned a lot already by googling etc ...
The following script should replace all spaces and ends-of-lines with "something (see below).
#!/bin/bash
i=0
while read line
do
fam="H`printf "%06d" $i`"
echo $line | sed -e 's//\t'$fam'\n/g'
i=$(($i+1))... (7 Replies)
Input:
--------------------------
123asd 456sdasda 789a
-------------------------
output wanted:
---------------------
123asd
456sdasda
789a
----------------------
I want this by sed in simple way
please help (I know by: tr ' ' '\n' < inputfile )I want it by sed only (5 Replies)
Hello everyone,
I want to replace all "," (commas) with a blank space
My command thus far is:
cat test.text | sed -e s/\`//g | awk '{print$1" "$2" "$3}'
I'm sure you guys know this, but the SED command that I am using is to get rid of the "`" (tics).
which gives me:
name ... (5 Replies)
Hi,
i have below string -
mynameis arpit
i want output like below -
mynameis\ arpit
that i am getting from below -
temp='mynameis arpit'
echo $temp|sed 's//\\ /g' --> mynameis\ arpit
now i am doing - (2 Replies)
Dear All,
I am new here. Could anyone help to find a sed script for replace the third "," to " "?
input:
abc,def,ghi,jkl,mno,pqr,stu,vxz
output:
abc,def,ghi jkl,mno,pqr,stu,vxz
Many thanks.
Please use code tags next time for your code and data. (2 Replies)
`echo $file | sed 's/ / /g'`
Hey guys I want help in converting the spaces in my file names to '\ ' .
Example:
UK maps --> UK\ maps
Could someone please help me.
I have tried the following sequences already (none of them work):
1)s/ /\ /g
2)s/ /\\ /g
3)s/ /\\\ /g
Can someone... (7 Replies)
Discussion started by: INNSAV1
7 Replies
LEARN ABOUT NETBSD
m_tag_init
M_TAG(9) BSD Kernel Developer's Manual M_TAG(9)NAME
m_tag, m_tag_get, m_tag_free, m_tag_prepend, m_tag_unlink, m_tag_delete, m_tag_delete_chain, m_tag_delete_nonpersistent, m_tag_find,
m_tag_copy, m_tag_copy_chain, m_tag_init, m_tag_first, m_tag_next -- mbuf tagging interfaces
SYNOPSIS
#include <sys/mbuf.h>
struct m_tag *
m_tag_get(int type, int len, int wait);
void
m_tag_free(struct m_tag *t);
void
m_tag_prepend(struct mbuf *m, struct m_tag *t);
void
m_tag_unlink(struct mbuf *m, struct m_tag *t);
void
m_tag_delete(struct mbuf *m, struct m_tag *t);
void
m_tag_delete_chain(struct mbuf *m, struct m_tag *t);
void
m_tag_delete_nonpersistent(struct mbuf *);
struct m_tag *
m_tag_find(struct mbuf *m, int type, struct m_tag *t);
struct m_tag *
m_tag_copy(struct m_tag *m);
int
m_tag_copy_chain(struct mbuf *to, struct mbuf *from);
void
m_tag_init(struct mbuf *m);
struct m_tag *
m_tag_first(struct mbuf *m);
struct m_tag *
m_tag_next(struct mbuf *m, struct m_tag *t);
DESCRIPTION
The m_tag interface is used to ``tag'' mbufs.
FUNCTIONS
m_tag_get(type, len, wait)
Allocate an mbuf tag. type is one of the PACKET_TAG_ macros. len is the size of the data associated with the tag, in bytes. wait
is either M_WAITOK or M_NOWAIT.
m_tag_free(t)
Free the mbuf tag t.
m_tag_prepend(m, t)
Prepend the mbuf tag t to the mbuf m. t will become the first tag of the mbuf m. When m is freed, t will also be freed.
m_tag_unlink(m, t)
Unlink the mbuf tag t from the mbuf m.
m_tag_delete(m, t)
The same as m_tag_unlink() followed by m_tag_free().
m_tag_delete_chain(m, t)
Unlink and free mbuf tags beginning with the mbuf tag t from the mbuf m. If t is NULL, m_tag_delete_chain() unlinks and frees all
mbuf tags associated with the mbuf m.
m_tag_delete_nonpersistent(m)
Unlink and free all non persistent tags associated with the mbuf m.
m_tag_find(m, type, t)
Find an mbuf tag with type type after the mbuf tag t in the tag chain associated with the mbuf m. If t is NULL, search from the
first mbuf tag. If an mbuf tag is found, return a pointer to it. Otherwise return NULL.
m_tag_copy(t)
Copy an mbuf tag t. Return a new mbuf tag on success. Otherwise return NULL.
m_tag_copy_chain(to, from)
Copy all mbuf tags associated with the mbuf from to the mbuf to. If to already has any mbuf tags, they will be unlinked and freed
beforehand. Return 1 on success. Otherwise return 0.
m_tag_init(m)
Initialize mbuf tag chain of the mbuf m.
m_tag_first(m)
Return the first mbuf tag associated with the mbuf m. Return NULL if no mbuf tags are found.
m_tag_next(m, t)
Return the next mbuf tag after t associated with the mbuf m. Return NULL if t is the last tag in the chain.
CODE REFERENCES
The mbuf tagging interfaces are implemented within the file sys/kern/uipc_mbuf2.c.
The PACKET_TAG_ macros are defined in the file sys/sys/mbuf.h.
SEE ALSO intro(9), malloc(9), mbuf(9)BUGS
The semantics of the term "persistent tag" are vague.
BSD September 7, 2004 BSD