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
LEARN ABOUT FREEBSD
atf-sh
ATF-SH(1) BSD General Commands Manual ATF-SH(1)
NAME
atf-sh [-s shell] -- interpreter for shell-based test programs
SYNOPSIS
atf-sh script
DESCRIPTION
atf-sh is an interpreter that runs the test program given in script after loading the atf-sh(3) library.
atf-sh is not a real interpreter though: it is just a wrapper around the system-wide shell defined by ATF_SHELL. atf-sh executes the inter-
preter, loads the atf-sh(3) library and then runs the script. You must consider atf-sh to be a POSIX shell by default and thus should not
use any non-standard extensions.
The following options are available:
-s shell Specifies the shell to use instead of the value provided by ATF_SHELL.
ENVIRONMENT
ATF_LIBEXECDIR Overrides the builtin directory where atf-sh is located. Should not be overridden other than for testing purposes.
ATF_PKGDATADIR Overrides the builtin directory where libatf-sh.subr is located. Should not be overridden other than for testing purposes.
ATF_SHELL Path to the system shell to be used in the generated scripts. Scripts must not rely on this variable being set to select a
specific interpreter.
EXAMPLES
Scripts using atf-sh(3) should start with:
#! /usr/bin/env atf-sh
Alternatively, if you want to explicitly choose a shell interpreter, you cannot rely on env(1) to find atf-sh. Instead, you have to hardcode
the path to atf-sh in the script and then use the -s option afterwards as a single parameter:
#! /path/to/bin/atf-sh -s/bin/bash
ENVIRONMENT
ATF_SHELL Path to the system shell to be used in the generated scripts.
SEE ALSO
atf-sh(3)
BSD
September 27, 2014 BSD