Dear forum
I have the following small script:
#!/bin/ksh
echo -e "abba-o" | awk -F '-' '{ print $2 }' | cut -b 1It needs to be ksh.. in bash I don't have this problem.
If I run this on opensuse 10.2 I get this as output: e
If I run this on suse enterprise 10 sp2 then I get this: o
... (1 Reply)
I have no idea what the following means. The teacher is too advanced for me to understand fully. We literally went from running a few commands over the last few months to starting shell scripting. I am not a programmer, I am more hardware oriented. I wish I knew what this question was asking... (3 Replies)
Does anybody know how to Accept a “userid” as a command line argument on a Unix Bourne Shell Script?
The output should be something like this:
User userid has a home directory of /path/directory
the default shell for this user is /path/shell (1 Reply)
Does anybody know how to Accept a “userid” as a command line argument on a Unix Bourne Shell Script?
The output should be something like this:
User userid has a home directory of /path/directory
the default shell for this user is /path/shell (1 Reply)
Does anybody know how to Accept a “userid” as a command line argument on a Unix Bourne Shell Script?
The output should be something like this:
User userid has a home directory of /path/directory
the default shell for this user is /path/shell (5 Replies)
Hello All,
i am known to the limitation of different shells while passing more than 9 command line arguments
i just tried the example below
i do see my current shell is tcsh
echo $SHELL
/bin/tcsh
so if i make my script executable and run it
output is
... (6 Replies)
hi,,,,
I want to create a command prompt, for example "prompt>", so my prompt need to handle commands, for example "prompt>cmd", so i want to know how to get arguments for my own commands cmd, i.e. default argc should contain arguments count and argv should point to the argument vector i.e, for... (2 Replies)
Hi... can anyone please help me out in using the CASE and command line argument in shell script... i am bit new to shell scripting...below i have explained my proble with example...
say i have an executable file with name 'new1.sh' and there are 3 functions in it a(), b() and c()....and there... (5 Replies)
hi,
I am new in the shell script, and c programming with linux. I am looking to pass the arguments in c program that should be executed by the shell script.
e.g.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv)
{ int i;
for (i=1;i<argc; i++)
{
... (2 Replies)
]I have a string like "/abc/cmind/def/pq/IC.2.4.6_main.64b/lnx86" and this string is given by user. But in this string instead of 64b user may passed 32 b an i need to parse this string and check wether its is 32b or 64 b and according to it i want to set appropriate flags.
How will i do this... (11 Replies)
Discussion started by: codecatcher
11 Replies
LEARN ABOUT DEBIAN
semanage_node_iterate
semanage_iterate(3) Libsemanage API documentation semanage_iterate(3)NAME
semanage_iterate - SELinux Management API
SYNOPSIS
The following iterate function is supported for any semanage record.
Replace the function and object name as necessary.
extern int ITERATE_FUNCTION (
semanage_handle_t *handle,
int (*handler) (
const semanage_OBJECT_t *object,
void *varg),
void *handler_arg);
DESCRIPTION
Behavior:
The iterate function will execute the specified handler over all objects in the selected location. An arbitrary argument can be
passed into the handler function along with each object.
The object passed in is property of the libsemanage library, and may not be modified or preserved - use semanage_OBJECT_clone if
that is necessary.
The handler code may not invoke any semanage write requests for the same object type (i.e. modifying the underlying store is not
allowed). The iterate function is reentrant only while inside a transaction (see semanage_begin_transaction ). It is not safe to
execute other semanage read or write requests within iterate if not inside a transaction. The handler may return -1 to signal error
exit, 0 to signal continue, and 1 to signal successful exit early (the iterate function will stop accordingly).
Parameters:
The handle is used to track persistent state across semanage calls, and for error reporting. The handler is the function to execute,
with handler_arg as its second parameter, and each object as its first parameter.
Requirements:
This function requires an semanage connection to be established (see semanage_connect(3) )
RETURN VALUE
In case of failure, -1 is returned, and the semanage error callback is invoked, describing the error. Otherwise a non-negative integer is
returned (a commit number). The same number will be returned by all other semanage object read calls until the next commit.
SEE ALSO semanage_handle_create(3), semanage_connect(3),
ivg2@cornell.edu 15 March 2006 semanage_iterate(3)