Sponsored Content
Full Discussion: arithmatic
Top Forums Shell Programming and Scripting arithmatic Post 302700829 by Ygor on Friday 14th of September 2012 09:37:03 AM
Old 09-14-2012
Syntax is fine for bash...
Code:
$ a=10 b=2 c=$(($a/$b))

$ echo $c
5

What shell are you using?
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

KSH arithmatic Integer overflow

Guys, I have two big numbers to multiply. In doing do I am getting integer overflow. I managed to multiply number but this number is useless as KSh does not recognise it as a valid number. Here is what I am doing $ expr 999999999999 \* 100 276447132 I got the right value by doing... (2 Replies)
Discussion started by: vikas_sri
2 Replies

2. Shell Programming and Scripting

Unix Arithmatic operation issue , datatype issue

Hi, I have a shell scripting. This will take 7 digit number in each line and add 7 digit number with next subsequent lines ( normal addition ). Eg: 0000001 0000220 0001235 0000022 0000023 ........... ......... ........ Like this i am having around 1500000 records. After adding... (23 Replies)
Discussion started by: thambi
23 Replies

3. Shell Programming and Scripting

arithmatic with awk

hi, i am trying some awk arthmatic calculation,i have a problem if any one can help let say if i have a file exm.txt 3 + 2 3 * 2 3 / 2 3 - 2 the output expected is awk -f exm.awk exm.txt 3 + 2 = 5 3 * 2 = 6 3 / 2 = 1.5 3 - 2 = 1 i simply used exm.awk { print $1 " + " $3 "= " $1 +... (3 Replies)
Discussion started by: phone_book
3 Replies

4. UNIX for Dummies Questions & Answers

Trying a arithmatic on a command line vs scripting.

Hi Everyone! I'm trying to do simple math on a single command line instead of a script which I've already set up using let etc. I can not get the same output to display on a command line. Essentially I would like a=20, b=50, and c=a*b. When I tried: let "A=20, B=50"; let C=A*B; echo $C ... (2 Replies)
Discussion started by: CasperQuiet
2 Replies

5. Shell Programming and Scripting

awk: round output or delimit output of arithmatic string

I have a file with the following content. > cat /tmp/internetusage.txt 6709.296322 30000 2/7/2010 0.00I am using the following awk command to calculate a percentage from field 1 and 2 from the file. awk '{ print $1/$2*100 }' /tmp/internetusage.txt This outputs the value "22.3643" as a... (1 Reply)
Discussion started by: jelloir
1 Replies
SSHMENU(1)						      General Commands Manual							SSHMENU(1)

NAME
sshmenu - GNOME applet for connecting to hosts using SSH. DESCRIPTION
The SSHMenu applet puts all your most frequently used SSH connections on a handy menu in your GNOME panel (see below for non-GNOME ver- sions. Click on a host name to open a new gnome-terminal window with an ssh connection to the selected host. Set up SSH options (such as port forwarding etc) and select a gnome terminal profile (for colour schemes, font sizes etc) using the preferences dialog. Add the applet to a GNOME panel in the normal way: right click on the panel, select 'Add to Panel' and then select the SSH Menu Applet from the list. Configure the applet using the 'Preferences' option on the applet menu. STANDALONE VERSIONS
The SSHMenu application uses the GTK GUI toolkit but is not dependent on the GNOME desktop environment. Two alternative wrapper scripts are provided: sshmenu-gnome - provides all the functionality of the SSHMenu applet but in a standalone application window that could (for example) be swallowed into the panel of an alternative desktop environment. sshmenu - provides similar functionality to sshmenu-gnome, but without any GNOME dependencies. Notably, xterm is used instead of gnome- terminal. The Hacker's Guide ( http://sshmenu.sourceforge.net/dev/hackers_guide.html ) describes a number of ways in which the SSHMenu can be further customised. OPTIONS
The applet is not invoked from the command-line however the standalone versions recognise the following options and can be extended to recognise more: -c FILE, --config-file FILE read and write config information to FILE instead of the default $HOME/.sshmenu -d NUM, --debug NUM set debug level to NUM (default: 0) -s NUM, --socket-window-id NUM use the XEmbed protocol to embed the SSHMenu user interface in the window identified by NUM instead of creating a new, top-level window, -V, --version output version information and exit AUTHOR
sshmenu-applet was written by Grant McLean <grant@mclean.net.nz> July 4, 2006 SSHMENU(1)
All times are GMT -4. The time now is 12:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy