The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 10-19-2006
Registered User
 

Join Date: Oct 2006
Posts: 28
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 02:12 AM.
Reply With Quote
Forum Sponsor
  #9  
Old 10-19-2006
Registered User
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,397
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 ))
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:32 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0