Hello-
Trying to add two numbers in a ksh shell scripts and i get this error every time I execute
stat1_ex.ksh: + : more tokens expected
stat1=`cat .stat1a.tmp | cut -f2 -d" "`
stat2=`cat .stat2a.tmp | cut -f2 -d" "`
j=$(($stat1 + $stat2)) # < Here a the like the errors out
echo $j... (3 Replies)
Hey everyone, i needed some help with this one. We move into a new file system (which should be the same as the previous one, other than the name directory has changed) and the script worked fine in the old file system and not the new. I'm trying to add the results from one with another but i'm... (4 Replies)
Hi All,
I write an script will have some functions... I am getting elif not expected error..
Even tried by using set -x for debug but no use..
Could you please help me out in this
Variables
....
....
....
TEST_SRC()
{
cat ${filesrc} >> ${filetgt}
if ]; then
echo... (12 Replies)
#include<stdio.h>
int main{
char *fl;
fl=(char*)malloc(150);
strcat(fl,"/tmp/OV/");
printf("\nInside fl--->%s\n",fl);
return 0;
}
I wrote a simple program as above. I got the error
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
Please help me out ! I am... (4 Replies)
Hi
I have written below script to get the data in table form.
#!/bin/sh
echo "File Name\tType"
for i in *;
do
echo "$i\t\c"
if ; then
echo "directory"
elif ; then
echo "symbolic link"
elif ; then
echo "file"
else
echo "unknown"
fi
donehowever i am getting output in different way... (3 Replies)
Hi All,
I have written a shell script which works all right on bash shell, but when it comes to execute it using ksh on AIX it gives the following error::(
bash$ /bin/ksh getShortInfo.sh
getShortInfo.sh: syntax error at line 26 : `(' unexpected
Could you please indicate what is... (4 Replies)
Hi Experts,
I have written the below script but its not working as per expectation.
My requirement is if this condition ] is satisfied
then only check for this condition ] if this also satisfied check for the condition ].
vi p_values.ksh
path="/db/ora/files"
mode=1
b_days=10... (5 Replies)
Hi
i am new to java and written a below code on linux platform which is working fine but not getting the output on terminal as expected
vi A.java
import java.io.FileOutputStream;
class A
{
public static void main (String args)
{
byte c= {'a','e','i','o','u'};
try
{... (1 Reply)
through below code i am trying to write a content in a file and then reading the same file
my code is running file but is not getting in proper way
import java.io.*;
class A1
{
public static void main (String agrs)
{
byte b = {'a','e','i','o','u'};
String s = "King Maker";
try
{... (7 Replies)
Discussion started by: scriptor
7 Replies
LEARN ABOUT NETBSD
prop_string_copy_mutable
PROP_STRING(3) BSD Library Functions Manual PROP_STRING(3)NAME
prop_string, prop_string_create, prop_string_create_cstring, prop_string_create_cstring_nocopy, prop_string_copy, prop_string_copy_mutable,
prop_string_size, prop_string_mutable, prop_string_cstring, prop_string_cstring_nocopy, prop_string_append, prop_string_append_cstring,
prop_string_equals, prop_string_equals_cstring -- string value property object
LIBRARY
Property Container Object Library (libprop, -lprop)
SYNOPSIS
#include <prop/proplib.h>
prop_string_t
prop_string_create(void);
prop_string_t
prop_string_create_cstring(const char *cstring);
prop_string_t
prop_string_create_cstring_nocopy(const char *cstring);
prop_string_t
prop_string_copy(prop_string_t string);
prop_string_t
prop_string_copy_mutable(prop_string_t string);
size_t
prop_string_size(prop_string_t string);
bool
prop_string_mutable(prop_string_t string);
char *
prop_string_cstring(prop_string_t string);
const char *
prop_string_cstring_nocopy(prop_string_t string);
bool
prop_string_append(prop_string_t str1, prop_string_t str2);
bool
prop_string_append_cstring(prop_string_t string, const char *cstring);
bool
prop_string_equals(prop_string_t str1, prop_string_t str2);
bool
prop_string_equals_cstring(prop_string_t string, const char *cstring);
DESCRIPTION
The prop_string family of functions operate on a string value property object type.
prop_string_create(void)
Create an empty mutable string. Returns NULL on failure.
prop_string_create_cstring(const char *cstring)
Create a mutable string that contains a copy of cstring. Returns NULL on failure.
prop_string_create_cstring_nocopy(const char *cstring)
Create an immutable string that contains a reference to cstring. Returns NULL on failure.
prop_string_copy(prop_string_t string)
Copy a string. If the string being copied is an immutable external C string reference, then the copy is also immutable and references
the same external C string. Returns NULL on failure.
prop_string_copy_mutable(prop_string_t string)
Copy a string, always creating a mutable copy. Returns NULL on failure.
prop_string_size(prop_string_t string)
Returns the size of the string, not including the terminating NUL. If the supplied object isn't a string, zero is returned.
prop_string_mutable(prop_string_t string)
Returns true if the string is mutable. If the supplied object isn't a string, false is returned.
prop_string_cstring(prop_string_t string)
Returns a copy of the string's contents as a C string. The caller is responsible for freeing the returned buffer.
In user space, the buffer is allocated using malloc(3). In the kernel, the buffer is allocated using malloc(9) using the malloc type
M_TEMP.
Returns NULL on failure.
prop_string_cstring_nocopy(prop_string_t string)
Returns an immutable reference to the contents of the string as a C string. If the supplied object isn't a string, NULL is returned.
prop_string_append(prop_string_t str1, prop_string_t str2)
Append the contents of str2 to str1, which must be mutable. Returns true upon success and false otherwise.
prop_string_append_cstring(prop_string_t string, const char *cstring)
Append the C string cstring to string, which must be mutable. Returns true upon success and false otherwise.
prop_string_equals(prop_string_t str1, prop_string_t str2)
Returns true if the two string objects are equivalent.
prop_string_equals_cstring(prop_string_t string, const char *cstring)
Returns true if the string's value is equivalent to cstring.
SEE ALSO prop_array(3), prop_bool(3), prop_data(3), prop_dictionary(3), prop_number(3), prop_object(3), proplib(3)HISTORY
The proplib property container object library first appeared in NetBSD 4.0.
BSD January 21, 2008 BSD