Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

cshell floating number arthematic

Status
Not open for further replies.

shiv_emf

Advanced Member level 2
Advanced Member level 2
Joined
Aug 31, 2005
Messages
605
Helped
22
Reputation
44
Reaction score
6
Trophy points
1,298
Activity points
4,106
Hi
How to add two floating number in schell script ?

1.2 + 1.3

thanks
 

set result=`echo 3.2 2.1 + p | dc`
echo $result


This will give the result 5.3

Mind the quotes - ( ` ` is not ' ' )
 

    shiv_emf

    Points: 2
    Helpful Answer Positive Rating
thanks!

Do u know awk, sed and zgrep. i was searching for scripts . usage....
 

shiv_emf said:
thanks!

Do u know awk, sed and zgrep. i was searching for scripts . usage....

Still a novice.
Awk and sed one-liners will be really helpful when working with the shell.
For scripting we can stick to either Perl or Tcl.
 

    shiv_emf

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top