I need Help


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers I need Help
# 8  
Old 10-19-2006
thank you for all this method was work very fine
x=`sed -n 1p Husam1.sh|awk -F"^" '{print $1}'|cut -c 1-12`
y=`sed -n 2p Husam1.sh|awk -F"^" '{print $7}'|cut -c 5-14`

but I need some one to explain in breaif becuase I don't under stand this two statment.

and can any help,
how can I subtract x from itself or any variable like it so I can get the result
for example if i subtract x from It self i will get zero

sorry , my freinds but i am new for the Unix

thanks a lot

Last edited by habuzahra; 10-19-2006 at 06:12 AM..
# 9  
Old 10-19-2006
Quote:
Originally Posted by habuzahra
how can I subtract x from itself or any variable like it so I can get the result for example if i subtract x from It self i will get zero
Space is needed before and after minus operator
Code:
result=`expr $x - $y`



Code:
(( result = x - y ))

 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question