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
Hi All,
I am using geopts inside a function in shell script.
But it is doesnt seem to read the input args and I always gt empty value in o/p.
my code is
http://sparshmail.ad.infosys.com/owa/14.2.318.4/themes/base/pgrs-sm.gif
This message has not been sent.
#!/bin/ksh IFS=' '... (1 Reply)
Discussion started by: prasperl
1 Replies
3. Shell Programming and Scripting
i have a case statement which branches to different sections based on an input. Each branch needs to call a function. below is the code. FOr some reason, the code inside the function is not getting executed. the code is below for reference.
in the below code echo "Function 1" which is there... (2 Replies)
Discussion started by: cvsanthosh
2 Replies
4. Shell Programming and Scripting
Hi all!
I have a function (named "orig") that analyze web sites given from an argument, it works very well when by itself:
#!/bin/bash
chain="$1"
echo chain $chain
curl "$chaine" -o prop.txt
...
and then it perform some analysis on the prop.txt
It works flawlessly if I type:
orig... (2 Replies)
Discussion started by: Zephyr
2 Replies
5. Shell Programming and Scripting
Hi.,
Last modified time of the folder is changing when I view the file inside the directory. Here is the test on sample directory. I believe that ls -l commands gives the time detail w.r.t last modified time. Pl. suggest.
bash-3.2$ mkdir test
bash-3.2$ cd test
bash-3.2$ touch myfile.txt... (2 Replies)
Discussion started by: IND123
2 Replies
6. Shell Programming and Scripting
Hi All,
I need a small help in formating a file.
I have a file with word like this;
ATGHYJIKOLFHJDHDGDYFGFYGRYGFYRHFYHFUED
DHDJFDFSJFLFJSKJFSLKJFGHDKLGLDKGLKDNVNV
VNLDVLDVDHFJDKDJVNVHSUFNHJFMVJFMVKJMFV
...
....
....like this 75000 words.
I want to convert this words into a single... (5 Replies)
Discussion started by: Lucky Ali
5 Replies
7. Shell Programming and Scripting
I have a continous polling happening inside a shell script on AIX. This actually calls a PL/SQL block. Is there a way I can set up a variable or pass an interrupt to end the script gracefully. I cant read from the config once the job starts running. Ideally I should change value of a variable and... (1 Reply)
Discussion started by: kshyju
1 Replies
8. Programming
#include <iostream>
using namespace std;
class A
{
public:
int Getvalue() { return i;}
private:
int i;
};
int main()
{}
The above code compiles properly in g++ or in any other C++ compiler.
BUT, the variable 'i' is used (in 'return i' statement) before it is... (1 Reply)
Discussion started by: deepthi.s
1 Replies
9. Shell Programming and Scripting
i have a script like this
#!/bin/ksh
initialize()
{
x=20
}
...
...
...
x=10
initialize;
echo $x (2 Replies)
Discussion started by: trichyselva
2 Replies
10. Shell Programming and Scripting
Hi All,
My 1.txt contains some functions
fun1()
....
....
fun2()
....
....
I can call these fun from 2.txt inside awk as below
value="`fun1 "argument1"`"
awk 'BEGIN {printf ("%s", "'"$value"'")}'
I need to modify the above code so that without using the variable to store... (2 Replies)
Discussion started by: jisha
2 Replies