Sponsored Content
Homework and Emergencies Homework & Coursework Questions problem in a shell based project Post 302472540 by dharmendramiet on Wednesday 17th of November 2010 11:23:09 AM
Old 11-17-2010
this is very funny situation
i tried the code on my laptop at home and its working fine
i dont know what goes wrong on the server with the code in office

tomorrow i will check it again in the office
for the while i have this code
################################
in deposit module
############
amtvalidation ()

{
len=`echo "$amt"|wc -c`
for((i=1;i<len;i++))
do
c=`echo "$amt"|cut -c$i`
case $c in
[0-9])continue;;
*)echo "invalid .enter:"
read amt
amtvalidation "$amt";;
esac
done
let r=amt%100
if [ $r -ne 0 ]
then
echo "enter amount in 100: "
read amt
amtvalidation "$amt"
fi
}

clear

echo "enter accno:"
read accno

echo "enter the amount:"
read amt
amtvalidation "$amt"

old=`grep -w "$accno" info|cut -d ":" -f7`

clear
sleep 1
echo "pre amt is $old "
let new=old+amt
sed "/$accno/s/$old/$new/" info > file
mv file info


echo
sleep 1
echo "added"
echo


n=`grep -w "$accno" info|cut -d ":" -f7`
sleep 1
echo "new amt is $n:"
echo


######################
in info file the red number is f7(field 7)
################
dha:jhjh:hgj@jhj.com:dha:8989898989:hjj:3800:123021
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

project idia in shell

could any one provide me any new real time project idea in shell scripting i am learning shell script and wants to do some real time development . (1 Reply)
Discussion started by: useless79
1 Replies

2. Programming

Problem with kerberos cpp project

Hi All, I am having problem with kerberos kadmin library in c++. I am using red hat linux Enterprise Linux Server release 5 (Tikanga), and gcc c++ - 4.1.1-52.el4.i386. When I make a c project (main.c) and use function from kadmin library such as kadm5_init_krb5_context(&context); ... (2 Replies)
Discussion started by: amitp
2 Replies

3. Solaris

building solaris-based enterprise router-firewall project

hi guys, its been a while since my last visit here, could not keep up the pace on this ever changing industry :) i'd just doing my home research under vmware to make a solaris-based router-firewall using zones - doing a lot of reading about zones & review solaris zone functionality. and... (4 Replies)
Discussion started by: stdout
4 Replies

4. Hardware

Need ideas for graduation project based on unix or linux

Dear all, i am in last year of electronics department in engineering faculty i need suggestions for a graduation project based on unix or free bsd or linux and electronics "embedded linux " i think about embedded unix for example or device drivers please i need helps (1 Reply)
Discussion started by: MOHA-1
1 Replies

5. UNIX and Linux Applications

Need ideas for graduation project based on unix or linux Need ideas for graduation project based on

Dear all, i am in last year of electronics department in engineering faculty i need suggestions for a graduation project based on unix or free bsd or linux and electronics "embedded linux " i think about embedded unix for example or device drivers please i need helps (1 Reply)
Discussion started by: MOHA-1
1 Replies

6. UNIX for Advanced & Expert Users

Need ideas for graduation project based on unix or linux

Dear all, i am in last year of electronics department in engineering faculty i need suggestions for a graduation project based on unix or free bsd or linux and electronics "embedded linux " i think about embedded unix for example or device drivers please i need helps (1 Reply)
Discussion started by: MOHA-1
1 Replies

7. Homework & Coursework Questions

Need ideas for graduation project based on unix or linux

Dear all, i am in last year of electronics department in engineering faculty i need suggestions for a graduation project based on unix or free bsd or linux and electronics "embedded linux " i think about embedded unix for example or device drivers please i need helps (1 Reply)
Discussion started by: MOHA-1
1 Replies

8. Solaris

Solaris based project?

Hi friends, I am a Computer Science student, and about to do my final year project. I am a big lover of Solaris and SPARC RISC computers, and I want to work on those computers in future. I want to become a System Administrator/Security Administrator etc on the Solaris stuff. Could you please tell... (1 Reply)
Discussion started by: gabam
1 Replies

9. Open Source

Project planing - with Linux based solutions

Hello, Please suggest or share any of your experience for the following requests: Request: 1. Creation of the local network. The company will be in the field of IT. 10-15 persons. 10 will be physically in the office. The local network should be secured and all the files and... (0 Replies)
Discussion started by: AQwert
0 Replies
times(1)							   User Commands							  times(1)

NAME
times - shell built-in function to report time usages of the current shell SYNOPSIS
sh times ksh times DESCRIPTION
sh Print the accumulated user and system times for processes run from the shell. ksh Print the accumulated user and system times for the shell and for processes run from the shell. On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways: 1. Variable assignment lists preceding the command remain in effect when the command completes. 2. I/O redirections are processed after variable assignments. 3. Errors cause a script that contains them to abort. 4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari- able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not performed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
ksh(1), sh(1), time(1), attributes(5) SunOS 5.10 15 Apr 1994 times(1)
All times are GMT -4. The time now is 10:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy