11-02-2009
Yes, you are right, but I need to list all the words which doesnt start with "-"
So I want to see the output as:
cls/dw_realease1 cls/dw_realease2 cls/dw_realease4 cls/dw_realease6
basically omitting cls/dw_realease3 and cls/dw_realease5
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Sorry for the duplicate thread this one is similar to the one in
https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121
Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies
2. Shell Programming and Scripting
Okay, title is kind of confusion, but basically, I have a lot of scripts on a server that I need to replace a ps command, however, the new ps command I'm trying to replace the current one with pipes to sed at one point. So now I am attempting to create another script that replaces that line.
... (1 Reply)
Discussion started by: cbo0485
1 Replies
3. UNIX for Dummies Questions & Answers
hi all,
attached you can find a small txt file ( .txt ),
GIVEN that past_scheduler="islip" and scheduler="mucf"
can somebody please tell me
WHY sed 's/-u '$past_scheduler'/-u '$scheduler'/g' .txt > .txt.temp fails ?
thanx (3 Replies)
Discussion started by: OneDreamCloser
3 Replies
4. Shell Programming and Scripting
Hello,
Can any perl experts help me convert my sed string to perl. I am unsuccessful with this.
I have to remove this string from html files OAS_AD('Top');
I have come up with this. However the requirement is in perl.
for find in $(find . -type f -name "file1.html") ; do cat $find |... (2 Replies)
Discussion started by: abacus
2 Replies
5. UNIX for Dummies Questions & Answers
I know this script is crummy, but I was just messing around.. how do I get sed's insert command to allow variable expansion to show the filename?
#!/bin/bash
filename=`echo $0`
/usr/bin/sed '/#include/ {
i\
the filename is `$filename`
}' $1
exit 0 (8 Replies)
Discussion started by: glev2005
8 Replies
6. UNIX for Advanced & Expert Users
Hi.....
I'm using sed command for replace the words in a file
cat >test.txt
My test.txt contains
Mary had a little ham
Mary fried a lot of spam
Jack ate a Spam sandwich
Jill had a lamb spamwich
Marry had a spicy wich
$ sed 's/wich$/mirchi/g' test.txt
output is:
Mary had a little ham... (24 Replies)
Discussion started by: ksrivani
24 Replies
7. Shell Programming and Scripting
Hello All,
I have something like below
LDC100/rel/prod/libinactrl.a
LAA2000/rel/prod/libinactrl.a
I want to remove till first forward slash that is outputshould be as below
rel/prod/libinactrl.a
rel/prod/libinactrl.a
How can I do that ??? (8 Replies)
Discussion started by: anand.shah
8 Replies
8. Shell Programming and Scripting
Hello,
I'm working with this command which I'm having trouble understanding it:
sed -e '1,$ s/SUB/N/g' < $1 > file.txt
Where SUB stand for an special character with code in ASCII is 0x1A, notepad read it as a right arrow.
Any help will be appreciated. (5 Replies)
Discussion started by: emilioveras
5 Replies
9. Shell Programming and Scripting
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
12 Replies
10. UNIX for Dummies Questions & Answers
Hi All,
I'm relatively new to Unix scripting and am trying to get my head around piping.
I'm trying to take a header record from one file and prepend it to another file. I've done this by creating several temp files but i'm wondering if there is a cleaner way to do this.
I'm thinking... (10 Replies)
Discussion started by: BigCroyd
10 Replies
KOBJ(9) BSD Kernel Developer's Manual KOBJ(9)
NAME
kobj -- a kernel object system for FreeBSD
SYNOPSIS
#include <sys/param.h>
#include <sys/kobj.h>
void
kobj_class_compile(kobj_class_t cls);
void
kobj_class_compile_static(kobj_class_t cls, kobj_ops_t ops);
void
kobj_class_free(kobj_class_t cls);
kobj_t
kobj_create(kobj_class_t cls, struct malloc_type *mtype, int mflags);
void
kobj_init(kobj_t obj, kobj_class_t cls);
void
kobj_delete(kobj_t obj, struct malloc_type *mtype);
DEFINE_CLASS(name, kobj_method_t *methods, size_t size);
DESCRIPTION
The kernel object system implements an object-oriented programming system in the FreeBSD kernel. The system is based around the concepts of
interfaces, which are descriptions of sets of methods; classes, which are lists of functions implementing certain methods from those inter-
faces; and objects, which combine a class with a structure in memory.
Methods are called using a dynamic method dispatching algorithm which is designed to allow new interfaces and classes to be introduced into
the system at runtime. The method dispatch algorithm is designed to be both fast and robust and is only slightly more expensive than a
direct function call, making kernel objects suitable for performance-critical algorithms.
Suitable uses for kernel objects are any algorithms which need some kind of polymorphism (i.e., many different objects which can be treated
in a uniform way). The common behaviour of the objects is described by a suitable interface and each different type of object is implemented
by a suitable class.
The simplest way to create a kernel object is to call kobj_create() with a suitable class, malloc type and flags (see malloc(9) for a
description of the malloc type and flags). This will allocate memory for the object based on the object size specified by the class and ini-
tialise it by zeroing the memory and installing a pointer to the class' method dispatch table. Objects created in this way should be freed
by calling kobj_delete().
Clients which would like to manage the allocation of memory themselves should call kobj_init() with a pointer to the memory for the object
and the class which implements it. It is also possible to use kobj_init() to change the class for an object. This should be done with care
as the classes must agree on the layout of the object. The device framework uses this feature to associate drivers with devices.
The functions kobj_class_compile(), kobj_class_compile_static() and kobj_class_free() are used to process a class description to make method
dispatching efficient. A client should not normally need to call these since a class will automatically be compiled the first time it is
used. If a class is to be used before malloc(9) is initialised, then kobj_class_compile_static() should be called with the class and a
pointer to a statically allocated kobj_ops structure before the class is used to initialise any objects.
To define a class, first define a simple array of kobj_method_t. Each method which the class implements should be entered into the table
using the macro KOBJMETHOD() which takes the name of the method (including its interface) and a pointer to a function which implements it.
The table should be terminated with two zeros. The macro DEFINE_CLASS() can then be used to initialise a kobj_class_t structure. The size
argument to DEFINE_CLASS() specifies how much memory should be allocated for each object.
HISTORY
Some of the concepts for this interface appeared in the device framework used for the alpha port of FreeBSD 3.0 and more widely in
FreeBSD 4.0.
AUTHORS
This manual page was written by Doug Rabson.
BSD
April 4, 2000 BSD