10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
Ubuntu server 11.10
can anybody help what is problem with my shell script?
#!/bin/bash
#script to find out currently logged on user is root or not.
if ]
then
echo "You are super"
else
echo "You are awesome!"
fi
When I run script, I get following output
./uid: line 3:
I... (4 Replies)
Discussion started by: kaustubh
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am in ksh.
below mentioned 3 commands I executed at command prompt & got the expected results.
csh
source csh_infa
<special command>
Now I have to do this in the script in ksh. I entered it as it is.
#!/bin/ksh
csh
source csh_infa
<special command>
Now after... (1 Reply)
Discussion started by: girish_kanak
1 Replies
3. Shell Programming and Scripting
my default profile is using ksh, I tried to write a simple scripts and I had issues, below is my scripts:
$ more if_num.ksh
USAGE="usage: if_num.ksh"
print -n "Enter two numbers: "
read x y
if ((x=y))
then
print "You entered the same number twice."
when I tried to executed the... (6 Replies)
Discussion started by: matthew00
6 Replies
4. Shell Programming and Scripting
script is:
dirname= "$(date +%b%d)_$(date +%H%M)"
mkdir $dirname
should create a directory named Nov4_
Instead I get the following returned:
root@dchs-pint-001:/=>./test1
./test1: Nov04_0736: not found.
Usage: mkdir Directory ...
root@dchs-pint-001:/=>
TOO easy, but what am I... (2 Replies)
Discussion started by: gwfay
2 Replies
5. UNIX for Dummies Questions & Answers
I have a script "abc.sh" in /tmp which has exit 0 as its last line
when I run this script from /tmp/xyz/def.sh script as
. ../abc.sh
then the script executes but the control doesn't return to def.sh script for subsequent commands in def.sh
but if I invoke the abc.sh from inside the... (3 Replies)
Discussion started by: rakeshou
3 Replies
6. Shell Programming and Scripting
Hello everybody...
I'm a Unix newbie and i just got this task at work to figure out what's wrong with a daily script my team is using.
The idea behind the script is that it takes the day before in a yyyymmdd format, find files with that date in a specific directory and executes an (irrelavant)... (4 Replies)
Discussion started by: adija
4 Replies
7. Shell Programming and Scripting
Hi
I made a small script which uses ksh.
When i run the script then i get the following error
However when i run each of the commands on the commandline they get executed and provide the desired output. i cant figure out why the script is not running.
Kindly Help
Thanks in... (3 Replies)
Discussion started by: PradeepRed
3 Replies
8. Shell Programming and Scripting
If I have
start = 02282006;
end = 03152006;
How do I get
startdate = 02/28/2006;
enddate = 03/15/2006;
Thanks, (3 Replies)
Discussion started by: britney
3 Replies
9. Shell Programming and Scripting
I trying to write a ksh script (without the help of the Kermit libraries) which connects to a ftp server and checks if the file "KEI.done" exists. If the file exists it print "files is there" if it doesnt exist it prints "file is not there". (the print statements will later be replaced with code to... (2 Replies)
Discussion started by: mike509123
2 Replies
10. Shell Programming and Scripting
I have a problem with the execution of a ksh as deamon on linux. I explain you first the context.
We have developped a Java program that execute every minutes an external (that we don't have developped) program with a config file in parameter.
The Java program is runned as deamon with a perl... (0 Replies)
Discussion started by: adrian.mihai
0 Replies