11-29-2010
My script is working but why do I get this msg?
Hi,
I have a script to determine the max memory to set a worker to start up at. The variable will need to end up being "-Xmx512m" or "-Xmx256m" or "-Xmx768m."
Everything works fine BUT when I set the "MEMORY" variable I get the "Cmmand not foundine 40: -Xmx512m" msg though the variable is the correct value and it starts up fine. Why do I get this message? Does it have something to do with "-" or "x"?
Script below:
maxMemSize=`grep '^'$branchCode $MEMORY_SIZE_DIR/LoaderMemoryAndUploadFileSize.properties | cut -d= -f 2`;
MEMORY= -Xmx$maxMemSize
10 More Discussions You Might Find Interesting
1. IP Networking
What do you think of the netstat msg about :
udp 2320 0 *:xdmcp *:* The 2320? Does that mean an error?
I used netstat -l | grep 'xdmcp' to get that, but does the 2320 indicate an error? I'm trying to figure out why, after i've enabled xdmcp to true, it is still not showing up... (2 Replies)
Discussion started by: kymberm
2 Replies
2. Programming
is it possible to use a msg queue with multiple threads spawned from the same app? (1 Reply)
Discussion started by: strider
1 Replies
3. Programming
hi...
i posted the code earlier but it wasnt quite readbale... ive added a few comments and made the indentation problem right...
the problem is that it doent seem to be working... ive almost pulled out my hair tryin to fix the prob
another wierd thing is that it worksthe 1st time when i... (0 Replies)
Discussion started by: strider
0 Replies
4. Shell Programming and Scripting
I want to display a message when the script is done running, but I do not want to use echo. Is there another command I can use besides echo? If so, show me how it is done. (1 Reply)
Discussion started by: dshea0001
1 Replies
5. UNIX for Dummies Questions & Answers
Hello ,
i have a problem in writing the shell script..
i have a script already written n just need to make a change in which when the script is not able to connect to the database ..it should print an error msg on the screen.
I have already seen previous posts on how to connect to the... (3 Replies)
Discussion started by: sommer_queen
3 Replies
6. Shell Programming and Scripting
Hello,
I am facing a very strange problem when I run my script manuallu ./Fetchcode which is using to connect with MKS integrity from linux end it workks fine but when I run it from cron it doesn't work.Can someone help me
1) How could I check my script when it is running from cron like... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies
7. AIX
When i run errpt -a, the output was below:
---------------------------------------------------------------------------
LABEL: DMPCHK_NOSPACE
IDENTIFIER: F89FB899
Date/Time: Tue Jan 17 15:00:02 BEIS
Sequence Number: 28998
Machine Id: 0058C0CE4C00
Node Id: ... (2 Replies)
Discussion started by: Ivanku
2 Replies
8. Shell Programming and Scripting
Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered.
The script is as follow:
#!/bin/sh
for file in file_1.txt file_2.txt file_3.txt
do
awk '{ print "0" }' $file > tmp.tmp
mv tmp.tmp $file
done
And the cron... (2 Replies)
Discussion started by: jasperux
2 Replies
9. UNIX for Dummies Questions & Answers
Hello out there,
I got a script that stops and restarts a webapp. I would like to be able to send warning reminders to the webusers as a warning like 5 minutes before it happens. Can I do this an if so how? (1 Reply)
Discussion started by: vsekvsek
1 Replies
10. Linux
how to get the outout from script to console.
i am running one script msg.sh using cron job every suday midnight. as soon as i logged in i want to see the staus is service started or service failed on console.
what command i need to add to script ?
msg.sh
#!/bin/bash
if
then
echo... (1 Reply)
Discussion started by: saku
1 Replies
MEMORY(2) System Calls Manual MEMORY(2)
NAME
memccpy, memchr, memcmp, memcpy, memmove, memset - memory operations
SYNOPSIS
#include <u.h>
#include <libc.h>
void* memccpy(void *s1, void *s2, int c, long n)
void* memchr(void *s, int c, long n)
int memcmp(void *s1, void *s2, long n)
void* memcpy(void *s1, void *s2, long n)
void* memmove(void *s1, void *s2, long n)
void* memset(void *s, int c, long n)
DESCRIPTION
These functions operate efficiently on memory areas (arrays of bytes bounded by a count, not terminated by a zero byte). They do not check
for the overflow of any receiving memory area.
Memccpy copies bytes from memory area s2 into s1, stopping after the first occurrence of byte c has been copied, or after n bytes have been
copied, whichever comes first. It returns a pointer to the byte after the copy of c in s1, or zero if c was not found in the first n bytes
of s2.
Memchr returns a pointer to the first occurrence of byte c in the first n bytes of memory area s, or zero if c does not occur.
Memcmp compares its arguments, looking at the first n bytes only, and returns an integer less than, equal to, or greater than 0, according
as s1 is lexicographically less than, equal to, or greater than s2. The comparison is bytewise unsigned.
Memcpy copies n bytes from memory area s2 to s1. It returns s1.
Memmove works like memcpy, except that it is guaranteed to work if s1 and s2 overlap.
Memset sets the first n bytes in memory area s to the value of byte c. It returns s.
SOURCE
All these routines have portable C implementations in /sys/src/libc/port. Most also have machine-dependent assembly language implementa-
tions in /sys/src/libc/$objtype.
SEE ALSO
strcat(2)
BUGS
ANSI C does not require memcpy to handle overlapping source and destination; on Plan 9, it does, so memmove and memcpy behave identically.
If memcpy and memmove are handed a negative count, they abort.
MEMORY(2)