10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to create a ksh script that will ask the user for the port number. $PORT1 is the variable I want to use that will contain whatever numbers the user inputs. The script would edit ports.txt file, search and delete "./serv 110.1.0.1.$PORT1 200;=3" .
So if the user types 50243 then the... (5 Replies)
Discussion started by: seekryts15
5 Replies
2. 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
3. Shell Programming and Scripting
hi all,
i create 1 file.txt and inside it contain :
file1
file2
file3
file 4
then output that i want in my script:
$1=file1
$2=file2
$3=file3
$4=file4
but,when write in ksh script with:
while read folder
set - $( echo ${folder} )
i=1
while (($i <= $#))
do
... (2 Replies)
Discussion started by: proghack
2 Replies
4. Shell Programming and Scripting
Hi - Help needed.
I have an input file that looks something like this, but with a lot more entries:
A
Customer1
B
4500
C
8000
A
Customer2
B
6422
C
8922
I need to be able to print details for each customer on one line per customer.
ie. if I could print these to a file and then cat... (3 Replies)
Discussion started by: frustrated1
3 Replies
5. Shell Programming and Scripting
Hi there,
in a script I have
#!/usr/bin/ksh
TEST=hello
export TEST
Problem is, that the variable doesn't get exported. I also tried
typeset -x TEST=hello
When I put the two lines in my .profile, the variable is set fine.
Whats could be the problem here? (4 Replies)
Discussion started by: doc_symbiosis
4 Replies
6. Shell Programming and Scripting
first of all, thanks to all on this board, it has been a huge resource to answer most of my questions!
I am stuck on something that should really be simple, and was looking for some help.. I am using KSH on solaris and working on a script to move containers from server to server. Where i am... (4 Replies)
Discussion started by: tksol
4 Replies
7. Shell Programming and Scripting
Guys i have strange behaviour with command output being saved in a variable instead of a tmp file.
1. I suck command output into a variable
Sample command output
# cleanstats
DRIVE INFO:
----------
Drv Type Mount Time Frequency Last Cleaned Comment
*** ****... (1 Reply)
Discussion started by: lavascript
1 Replies
8. Shell Programming and Scripting
When reading over some perl code in a software document, I came across an assignment statement like this
$PATH = ${PROJECT}/......./....
In this particular form of scalar variable assignment, what does the curly braces operators do ? Also, what is the benefit in doing scalar assignment this... (3 Replies)
Discussion started by: JamesGoh
3 Replies
9. Shell Programming and Scripting
hi
I've been searching all over the internet to simply do the following:
$tempfile = "/usr/school/tempfile.dat";
$myvar = param('add'); ###add is the variable assigned to a popup menu
`ls -l $myvar * >> $tempfile` ###I also tried `ls -l ${myvar}* >>$tempfile`
open(ADDLIST,... (6 Replies)
Discussion started by: mehdi9
6 Replies
10. Shell Programming and Scripting
Hi,
I am writing a ksh script which will use sqlplus to run a sql and pass 2 variables as the SQL request. In the ksh script, I have 2 variables which are $min_snap and $max_snap holding 2 different numbers.
Inside the same script, I am using SQLPLUS to run an Oracle SQL script,... (6 Replies)
Discussion started by: rwunwla
6 Replies