Sponsored Content
Top Forums Programming cp and rm return non zero value Post 302133057 by porter on Tuesday 21st of August 2007 07:07:39 PM
Old 08-21-2007
1. You don't need the "\n" at the end of the string for system()

2. Try without the "2>/dev/null" and it might tell you why.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Return value

Hallo I want write a sh script but I have some troubles! How can I write the Return value to a variable? I need an egrep command with the option -c, how many times it give the pattern. This return value shold be written in a variable. Could you help me? (1 Reply)
Discussion started by: raphael.schwend
1 Replies

2. Shell Programming and Scripting

the return value $?

Could someone tell me that's the return value $? 15 mean? Where can i find out more? Many thanks (3 Replies)
Discussion started by: gusla
3 Replies

3. UNIX for Advanced & Expert Users

if (( $# != 1 )) ---- what will this return

Hi this is an existing code written by somebody. Please help me in understanding the meaning of this if (( $# != 1 )) (3 Replies)
Discussion started by: satgur
3 Replies

4. Shell Programming and Scripting

script to return value

I have 3 scripts script A - wrapper script to disguise invoker true identity script B - perform database operation and return a value (either W/H) -> return value by echoing the result script C - use script A to mask as the database owner then invoke script B to retrieve the value ... (1 Reply)
Discussion started by: mpang_
1 Replies

5. UNIX for Dummies Questions & Answers

Return Value

How do I find out the return value of a shell script or program in Unix? Is there a command to find that out?? (1 Reply)
Discussion started by: carl_vieyra
1 Replies

6. UNIX for Dummies Questions & Answers

return ${1-0}

Hi, What does the above command means? this is used in the following function function _set_return_code { return ${1-0} } (3 Replies)
Discussion started by: neeto
3 Replies

7. UNIX for Dummies Questions & Answers

to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's

Hi All, Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'. I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies

8. Shell Programming and Scripting

return value of a function

I have write a shell function to get the maximum of a vector. However, the returned value from the function is not always the correct one. Here is the script: maxval() { local max j i size arrval size=$1 ; shift max=-999999999 i=0 while do arrval="$1" if then ... (5 Replies)
Discussion started by: fl0r10
5 Replies

9. Shell Programming and Scripting

how should I get the return value

ls xx > yy.log echo $? can get the return value of "ls xx" but if I use ls xx |tee -a yy.log I can't get the return value of "ls xx", and I get the return value of the whole cmd "ls xx |tee -a yy.log", it is always "0" my question is how could I get the return value of "ls xx"... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

10. Shell Programming and Scripting

Return: can only `return' from a function or sourced script

Not sure where the problem is. I can run the script without any issue using the following command. . /opt/app/scripts/cdc_migration.sh But it fails with the below error when I try it this way /opt/app/scripts/cdc_migration.sh /opt/app/scripts/cdc_migration.sh: line 65: return: can only... (1 Reply)
Discussion started by: svajhala
1 Replies
wsprintf(3C)						   Standard C Library Functions 					      wsprintf(3C)

NAME
wsprintf - formatted output conversion SYNOPSIS
#include <stdio.h> #include <widec.h> int wsprintf(wchar_t *s, const char *format, /* arg */ ... );); DESCRIPTION
The wsprintf() function outputs a Process Code string ending with a Process Code (wchar_t) null character. It is the user's responsibility to allocate enough space for this wchar_t string. This returns the number of Process Code characters (excluding the null terminator) that have been written. The conversion specifications and behavior of wsprintf() are the same as the regular sprintf(3C) function except that the result is a Process Code string for wsprintf(), and on Extended Unix Code (EUC) character string for sprintf(). RETURN VALUES
Upon successful completion, wsprintf() returns the number of characters printed. Otherwise, a negative value is returned. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------------------------------------+ |ATTRIBUTE TYPE ATTRIBUTE VALUE | |MT-Level MT-Safe | +-----------------------------------------------------------+ SEE ALSO
wsscanf(3C), printf(3C), scanf(3C), sprintf(3C), attributes(5) SunOS 5.11 29 Dec 1996 wsprintf(3C)
All times are GMT -4. The time now is 03:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy