Needed help in understanding these procedures?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Needed help in understanding these procedures?
# 1  
Old 05-26-2008
Needed help in understanding these procedures?

Hi all,
i needed some help in understanding a few procedures and how exactly is the sequence?
Code:
FINISHED="Done"

COLUMNS=$( stty -a | head -n 2 | cut -d " " -f2 |cut -d " " -f4 )
COLS=$((${COLUMNS} -${#FINISHED} - 5))


RET_ARR="\010"

KILLLINE=${RET_ARR}${RET_ARR}
for i in $(seq 1 $COLS)
do
    KILLLINE=${KILLLINE}${RET_ARR}
done


echo -n "0"
multiecho $(($COLS-4)) " "
echo '100%' ;


echo -n "|"
multiecho $COLS " "
echo -n "|"

PERCENTAGE=$(($COLS * $DESTFILESIZE / $SOURCEFILESIZE ))
       echo -e -n $KILLLINE"|"
    multiecho $PERCENTAGE "="

The destfile and the source file contain the size of respective ones..
I have not included them....
just pasted which part ive not understood
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Programming

For loop mysql procedures

Hi Forum how can I make for loop or while loop as below, in mysql language for i in (1, 2, 4, 6, 9) do ...... done similar to unix... (1 Reply)
Discussion started by: yahyaaa
1 Replies

2. Solaris

Solaris upgrade/migration procedures

Guys, I am more into IBM/HP unix stuff and my org wants me to do some kungfu on SUN :wall: , I have fair understanding of solaris only and I need ur help . I have to migrate all of my existing solaris boxes to their latest levels ( soalris 10) , having this daunting task I need your... (4 Replies)
Discussion started by: nivaspIND
4 Replies

3. Debian

Procedures in the #apt commands.

I have installed squeeze 6.0.0 as a base install from: Network install from a minimal CD. Debian -- Network install from a minimal CD i do see a lot of information on the various #apt commands , yet is is all garble goop as far as trying to make sense of where to begin at to install... (3 Replies)
Discussion started by: cowLips
3 Replies

4. Shell Programming and Scripting

Help needed for understanding a function

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

calling two procedures from one ksh ???

Hi to all, This is first posting in this forum. I quite new to this KSH....i guess i ll have some fun...:) Well, I have two indivdual korn shell scripts. i m calling PL/SQL stored procedure from korn shell script. It works absolutely fine. Once its completed the log is updated and data is... (5 Replies)
Discussion started by: shashi369
5 Replies

6. Shell Programming and Scripting

Help Needed in understanding this command

Hi All, I search the forum for my query, Glad that got solution to it. But i really want to understand how does this command work. sed -e ':a' -e 's/\("*\),\(*"\)/\1~\2/;ta' Basically it is replacing all the comma(,) characters in between quotes with a tilde. Specially what does ':a' ,... (2 Replies)
Discussion started by: DSDexter
2 Replies

7. UNIX for Dummies Questions & Answers

Stored Procedures

Dear friends, can anyone suggest links for online books on stored procedures in oracle. Cheers, (2 Replies)
Discussion started by: thumsup9
2 Replies

8. Shell Programming and Scripting

Procedures are not called ?

My shell script is executing i am having no syntax errors or other errors. When i am testing the shell script i am having a problem that the procedure Prompt, Environment,List are not found. I defined all these procedures in the shell script. Environment() { FULL=N export FULL LOGON=cat... (2 Replies)
Discussion started by: dreams5617
2 Replies
Login or Register to Ask a Question