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 Everyone,
i have following in my file
1
2
3
4
5
6
.
.
100
and now i want the output as
1 4 7 ..........so on..............97 100 (10 Replies)
Discussion started by: zozoo
10 Replies
3. UNIX for Dummies Questions & Answers
Dear all,
I am new to use unix. I run the following command and got the error. Anyone knows how should I modify the command. Thanks a lot!
$
for chr in 'seq 1 23';
do
awk 'BEGIN {print "T","pheno";}{print "M",$2}' out_${chr}.map > dat_${chr}.dat;
done
error message:... (2 Replies)
Discussion started by: forevertl
2 Replies
4. Shell Programming and Scripting
There is a function called start:
start()
{
echo -n $"Sending Startup Email: "
echo "${RESTARTBODY}" | mutt -s "${RESTARTSUBJECT}" ${EMAIL}
RETVAL=$?
if ; then
touch ${LOCKFILE}
success
else
failure
fi
echo
return ${RETVAL}
}
Can anyone explain what the bold part of the... (3 Replies)
Discussion started by: proactiveaditya
3 Replies
5. Shell Programming and Scripting
Actually I got a list of file end with *.txt
I want to use the same command apply to all the *.txt
Thus I try to find out the fastest way to write those same command in a script and then want to let them run automatics.
For example:
I got the file below:
file1.txt
file2.txt
file3.txt... (4 Replies)
Discussion started by: patrick87
4 Replies
6. Shell Programming and Scripting
Hi,
Iam in a need for a script/function in KSH where I want to read a text file (property file) in block by block. Here is the example:
Heading Name Descripton
Block Block1 Value1 Description
Property Name Value
Property Name Value
Property Name Value
Property Name Value
Property Name... (7 Replies)
Discussion started by: ysreenivas
7 Replies
7. Shell Programming and Scripting
Dear Experts,
Please find below the script in perl and can any body convert this script exactly in to oracle 9i fiunction which will return the required result same as perl.
#!/usr/bin/perl
$nof=@ARGV;
@var2 = ();
for($n=0; $n<$nof; $n++)
{
$filename = @ARGV;
open... (3 Replies)
Discussion started by: shary
3 Replies
8. Shell Programming and Scripting
Hey guys.!
Need some help.I want to write a script , which should be continuosly running and should keep calling a function after every say 5 or 10 seconds.
I am done with almost all part of it, but figuring out how to keep the script continuosly running and how to keep calling a function after... (11 Replies)
Discussion started by: nua7
11 Replies
9. Shell Programming and Scripting
:confused:Hi ,
I have a script as shown below:
rpttxt()
{
name="$*"
awk '/'"${name}"'/ {print $2 $3"=" $4}' file.txt
}
xx = rpttxt "COL_HEAD_1"
awk 'BEGIN {printf("%36s \n ","'"$xx"'")}'
rpttxt() is a function..I want to store the final result of this function in... (3 Replies)
Discussion started by: jisha
3 Replies
10. Shell Programming and Scripting
Hi All,
I am trying to manipulate a file using awk in UNIX. My file "test_file" is structured as follows:
field1:field2:field3
field4:field5:field6
field7:field8:field9
My requirement is to calculate another field (which would be let's say sum of 2nd and third column and put as fourth... (4 Replies)
Discussion started by: Vikas Sood
4 Replies