CentOS .sh server help
Hey, I'm quite new to CentOS/linux and I'm trying to run a server. I've installed all the required things, and the server was originally meant to be ran on windows, hence I had problems making it compatible with CentOS. The problem I'm having is that I'm not sure if my .sh is in proper format for it to launch, because it doesn't show any error nor any signs of success so I'm not too sure if it's working. Any ways, this is what happens when I launch it from terminal.
Code:
[root@xx lithium]# sh dump-items.sh dump-items.sh Code:
#!/bin/sh Code:
#!/bin/sh Code:
#!/bin/sh Code:
#!/bin/sh -Steven |
1. when writing a shell script, use multiple lines; easier to read/debug and it runs just as fast.
2. you can only export values down to sub-shells created in the parent; all of yours are running at the same level, so you can't export vars between them like that. 3. *nix is a quiet system; a cmd generally only outputs something if a) an error occurred or b) the cmd is supposed to return some data eg the ls cmd. Otherwise its quiet. You can check the success status using the shell special internal var '$?' http://tldp.org/LDP/abs/html/internalvariables.html 4. Try these links http://rute.2038bug.com/index.html.gz http://tldp.org/LDP/Bash-Beginners-G...tml/index.html http://www.tldp.org/LDP/abs/html/ |
Hey, thanks for the reply but I am not quite sure what you just said, again I am new to CentOS/linux and this is my first time using it.
For 3. , is there a way to make it show what's on the .sh's instead of it running quiet? -Steven |
Quote:
Quote:
Code:
export CLASSPATH=".:dist/(..):dist/ Code:
#!/bin/sh |
Thank you very much, sorry for being a bit clueless but I did understand and have learnt from this.
And I completely understand the consequences of hosting a private server. Steven |
All times are GMT -5. The time now is 06:21 AM. |