10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm reading a text file using a while loop but when I call a function from within this loop it exits that same iteration … even though there are many more lines in the file to be read.
I thought it was something to do with the IFS setting but it appears that a function call (when run... (3 Replies)
Discussion started by: user052009
3 Replies
2. Shell Programming and Scripting
Hi.
I need to make multiple string replacements in a file but several of the strings have been broken up by a carriage return so that the first few characters are on one line and the remainder on the following line.
E.g like the word 'post' in the following:
Use descriptive thread... (3 Replies)
Discussion started by: Big_Jeffrey
3 Replies
3. Shell Programming and Scripting
Hello,
How do i usecarriage return in ksh.
I want to do an echo "bla bla" and another echo "bla bla" will appear and replace the first echo on screen.
I tried:
until ; do
echo "bla bla \r"
done
please advice.
Thanks. (3 Replies)
Discussion started by: LiorAmitai
3 Replies
4. Shell Programming and Scripting
Let me know if there is a way to pass array to a funtion in ksh script.
function isPresent
{
typeset member
member=$1
dbList=$2
echo '$1:' $1
echo '$2' $dbList
The array will be at the second position....something like this
isPresent 12 <array>
if
then
echo... (3 Replies)
Discussion started by: prasperl
3 Replies
5. Shell Programming and Scripting
All:
I am calling a PERL script from KSH. I need specific codes to be returned by the PERL Script.
For ex:
Ksh
-----
result=`test.pl $FILE`
My idea is to get the value of result from the test.pl, by specifically making the test.pl to print the return code. Since I had some other print... (1 Reply)
Discussion started by: ucbus
1 Replies
6. Shell Programming and Scripting
Hi ,
I m facing one problem with String usage in AWK . let me put what i need .
i have a function and there i used one string ( meta_string)
function 1 {
...................
...................
meta_string = " this string got... (1 Reply)
Discussion started by: madhaviece
1 Replies
7. Shell Programming and Scripting
Hi friends
I need to return string value in functions
can anyone help me out to return string values rather than integer.
#!/bin/bash
add_a_user()
{
USER=$1
COMPANY=$2
shift; shift;
echo "Adding user $USER ..."
echo "$USER working in $COMPANY ..."
ret_type=YES
return... (1 Reply)
Discussion started by: kittusri9
1 Replies
8. UNIX for Advanced & Expert Users
Hi I am having the script which contains more functions. I want to exit the function if any failure. I tried with exit - the session itself is getting logged out. How can i fix this issue? (11 Replies)
Discussion started by: sharif
11 Replies
9. Shell Programming and Scripting
Hi All,
just wanted to ask if functions created in a Korn shell script can be passed parameters and if so what is the syntax for creating a function with parameters?
thanks
Mani (3 Replies)
Discussion started by: scriptingmani
3 Replies
10. Shell Programming and Scripting
Hi all, I have a ksh script that calls a tcl proc that sets a variable that I am attempting to return to the calling script? Is this possible or does the tcl variable live in its own space that I cannot access from ksh.
I have tried the following but when I do the var in my script is empty... (5 Replies)
Discussion started by: dfb500
5 Replies