software et al: odds & ends or bag of tricks

    i'm populating this site with pieces of code, tips, notes, ...
    any feedback will be greatly appreciated!

2007/06/03

shell: expresiones aritmeticas

Hay dos posibilidades, utilizar el operador aritmetico $(()):


    i=1
    i=$(($i+1))
    echo $i


o bien el comando shell 'expr':


    i=1
    i=`expr $i + 1`
    echo $i


AH
Posted by rhXX at 18:17
Labels: arithmetic, expresion, linux, shell, variable

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)
Powered By Blogger

Blog Archive

  • ▼  2007 (25)
    • ►  Aug 2007 (4)
    • ▼  Jun 2007 (14)
      • BLOG / HTML / special characters
      • MAKE - automatic variables
      • RCS ident fields
      • VBA getConfig: retreive key:value from a config sheet
      • Outlook security error: A program is trying to sen...
      • Wait Method
      • How to use SendKeys to imitate the keyboard
      • ISO 3166 Codes & Top level domains
      • python: comments
      • the quick brown fox jumps over the lazy dog
      • shell: expresiones aritmeticas
      • noclobber / shell options / overwrite files
      • create or set a file to null length
      • regular expresions / eval / php
    • ►  May 2007 (5)
    • ►  Apr 2007 (2)

unassorted links

  • BASH Programming - Introduction HOW-TO
  • blogger dummies guide
  • blogger for dummies
  • blogger for dummies
  • blogger testing geta
  • bloggers tips and tricks
  • ODI's software site (nice collection of software notes)

unassorted groups

  • HELP Google Blogger
  • HELP Google Calendar
  • HELP Google Gmail
  • HELP Google Groups
  • HELP Mozilla Firefox
  • HELP Mozilla Thunderbird
  • LANG ASM
  • LANG C
  • LANG C++
  • LANG Python
  • LINUX misc
  • LINUX networking
  • WINDOWS XP (en)
  • WINDOWS XP (sp)

About Me

rhXX
View my complete profile

counter


Picture Window theme. Theme images by enot-poloskun. Powered by Blogger.