10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Any reason why this thing doesn't works in Korn Shell
for (( expr1; expr2; expr3 ))
do
..... ... repeat all statements between do and done until expr2 is TRUE Done
Rgds,
TS (4 Replies)
Discussion started by: targetshell
4 Replies
2. Shell Programming and Scripting
Hi,
I'm trying to write a for loop to run through a list of servers and for each server copy a file to a backup file. But I can't seem to get it to run through my server list. It work for individual servers, please see below.
#!/bin/ksh
SSH_USERID=khcuser
webservers="server1 server2"
... (2 Replies)
Discussion started by: elmesy
2 Replies
3. Shell Programming and Scripting
#!/bin/ksh
log=ABCl
log=EFG
log=HIJ
i=0
while <------ what is the meaning of ($i - lt 3)
do
print ${log}
(( i=i+1 ))
done (1 Reply)
Discussion started by: Bperl1967
1 Replies
4. Shell Programming and Scripting
Hello Everyone,
I'm still trying to grasp many concepts in .ksh scripting, one of them being variables inside loops. My problem is the following:
* I'm trying to set a variable inside a while read loop to reuse it outside of said loop. My lines are the following :... (13 Replies)
Discussion started by: jimmy75_13
13 Replies
5. Shell Programming and Scripting
Guys,
I am new in awk , I face problem while i try to use for loop in awk,
I am using ksh, i am trying to set a for loop which runs as man times as the records in a file , the for loop like for(a=1;a<=5;a++) is working in my awk script but the one i need is not working :wall:
for example
... (8 Replies)
Discussion started by: djahmed
8 Replies
6. Shell Programming and Scripting
I am trying to write a script that will allow me to train others with commands that I run manually by only allowing the exact command before continuing onto the next set of commands. Here is where I come into an issue. I have changed the directories for this post.
Software we run creates files... (2 Replies)
Discussion started by: hurtzdonut
2 Replies
7. Shell Programming and Scripting
Hi ALL,
I need to take some command line arguments for my script and then want to run a function for each argument.I thought of using for loop as below, but its not working , can some one please help...
#!/bin/ksh
lpar1=$1
lpar2=$2
lpar3=$3
lpar4=$4
lpar5=$5
echo "$lpar1" >>lpar.txt
echo... (4 Replies)
Discussion started by: prashant43
4 Replies
8. Shell Programming and Scripting
Ih all,
i have multiples ksh scripts for crontab's unix jobs
they all have same variables declarations and some similar functions
i would have a only single script file to declare my variables, like:
var1= "aaa"
var2= "bbb"
var3= "ccc"
...
function ab { ...}
function bc { ... }... (2 Replies)
Discussion started by: wolfhurt
2 Replies
9. Shell Programming and Scripting
hi all,
got this silly problem and i just can't seem to make sense of the error message its is saying 1400: cannot open. its my first time at writing a while loop but tried all sorts to get it working without success.
#!usr/bin/ksh
integer max=1400
set file="afilename"
integer i=1
... (3 Replies)
Discussion started by: scriptingmani
3 Replies
10. Shell Programming and Scripting
I'm no unix pro for sure, but I have programmed enough other languages to usually get the job done in unix when I have to.
I'm currently trying to automate a manual diagnostic process. One of the steps in the manual process generates a file of text output. The next step is running a small... (4 Replies)
Discussion started by: bschnair
4 Replies