10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am having script which contains many functions. Need to print each function name at the starting of the function. Like below,
functionname()
{
echo "functionname"
commands....
}
I've tried like below,
func=`grep "()" scriptname | cut -d "(" -f1`
for i in $func
do
nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
2. Shell Programming and Scripting
Apologies if this is the incorrect forum.There is an issue in the function call I am facing while calling the same from a unix shell scripts.
Basically, I want the ref cursor to return values to a variable in sqlpus. The function call is currently saved in a ".txt" file
in a unix location. I want... (7 Replies)
Discussion started by: amvip
7 Replies
3. Shell Programming and Scripting
I am trying to allow a user to enter in text and then store that text in a variable $gene to run in an awk command in which those values are used to run some calculations. I am getting syntax errors however, when I try. Thank you :).
The awk runs great if it is a pre-defined file that is used,... (7 Replies)
Discussion started by: cmccabe
7 Replies
4. UNIX for Dummies Questions & Answers
May i please know why is it printing the script name for $0 when i pass those parameters to function.
#!/bin/bash -x
usage()
{
echo "In Usage Function"
echo $0
echo $1
echo $2
}
echo "printing first time"
echo $0
echo $1
echo $2
usage $0 $1 $2
Output: (2 Replies)
Discussion started by: Ariean
2 Replies
5. Homework & Coursework Questions
Good Evening. I'm new to C. Can you please help me.
I'm creating an error checking function, user will input a string, this will check if the input is all alphabet or all letters only. If there is a digit or other special char, it will print Error then ask input from user again.
Here's my... (1 Reply)
Discussion started by: eracav
1 Replies
6. UNIX for Dummies Questions & Answers
Hi !
It is a general question.
When an awk script looks like:
#! bin/awk
function example(i){
<body>
}
{
example(1) #the function uses input_1 and return output_a
}
{
example(2) #the function uses previous output_a as an input and returns... (15 Replies)
Discussion started by: beca123456
15 Replies
7. Shell Programming and Scripting
HI
i have written a script to ask input from the user.
this script should promote the user for y/n input. if user enters anyother input then y/n
the script promotes him again. this below code is working fine for all the cases.
except for space and enter " if i give space and enter it is... (2 Replies)
Discussion started by: BHASKARREDDY006
2 Replies
8. Shell Programming and Scripting
Hi all
i have the command called printer which needs a usernmae for example i would run the commnad
printer <username>
how can i write i quick script in perl that if the username is ab then write "denined" and if it is anything else it will work
thanks
Adam (1 Reply)
Discussion started by: ab52
1 Replies
9. Shell Programming and Scripting
Dear Forum
I'm Trying to use split function to split a string, but the output is not as the same order as of the string, please see simple example
echo " " | nawk -v var="First;Second;Third;Fourth" '
BEGIN {split(var, arr,";") for(i in arr){print arr }}'
The output is
Second
Third... (6 Replies)
Discussion started by: yahyaaa
6 Replies
10. UNIX for Advanced & Expert Users
m using unix c with curses
im trying out the conversion of an existing code in c to i18n for the japanese language.
the problem is that, the input which is given as the japanese characters is not taken correctly.
and what it outputs is question marks(i.e. ???), equivalent to the number o f... (4 Replies)
Discussion started by: nirnay_s
4 Replies