10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I am new to UNIX. I am working on a script where it takes the input and produces a desired output and it works fine for one instance.
Input(One Instance):
CREATE TABLE TAB1
(
COL1,
COL2
);
CREATE UNIQUE INDEX XPKTAB1
(
COL1
)TAB1;
Output:
CREATE TABLE TAB1
(
COL1,
COL2... (8 Replies)
Discussion started by: varun2327
8 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
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
6. Shell Programming and Scripting
Hi,
I've tried searching the forums for a case similar to mine but was unsuccessful. This is my first time to use awk so any help would be really appreciated :)
I have one file containing data for with the first value in each row being a State Name. I would need to create a separate file... (1 Reply)
Discussion started by: karver
1 Replies
7. Shell Programming and Scripting
Hello,
Im a beginner. Im writing a ksh script with awk. Is it possible to assign the output of the awk to a shell variable?
Like,
shell_variable= awk '$1 == "shell" {abc= $2 }' /tmp/cust_det
echo $shell_variable
Please excuse my ignorance. Thanks in advance. (4 Replies)
Discussion started by: Nic_writes
4 Replies
8. Shell Programming and Scripting
I need help finding out why this script wont run. The chmod is okay, but i get an error saying that I need '&&' on line 5. (18 Replies)
Discussion started by: tefflox
18 Replies
9. Shell Programming and Scripting
I'm trying to write a ksh script that uses awk, but I want to pass variables to awk. For example (not working):
if ];then
searchstr=$1
lsof -i | awk '{if($9~/SEARCHSTR/) print $2} SEARCHSTR=$searchstr'
else
echo "usage: $0 <search string>"
fi
I tried several options. Is it... (3 Replies)
Discussion started by: rein
3 Replies
10. Shell Programming and Scripting
How can I extract the 9th line of a text file.
thanks vm.:confused: (2 Replies)
Discussion started by: hoang
2 Replies