LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Password
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.

Notices


Reply
  Search this Thread
Old 08-12-2019, 01:51 AM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 105,766

Rep: Reputation: 117Reputation: 117
LXer: How to Increment and Decrement Variable in Bash


Published at LXer:

One of the most common arithmetic operations when writing Bash scripts is incrementing and decrementing variables. This is most often used in loops as a counter, but it can occur elsewhere in the script as well. Incrementing and Decrementing means adding or subtracting a value (usually 1), respectively, from the value of a numeric variable. In Bash, there are multiple ways to increment/decrement a variable. This article explains some of them.

Read More...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: C Command Line Tutorial 6 - Code indentation, increment/decrement operators, do-while and for loops, and more LXer Syndicated Linux News 0 02-25-2019 01:51 PM
[SOLVED] Bash: How to increment an alphabetic value of a variable alphabetically? jdkaye Linux - Software 17 06-15-2018 03:30 PM
Decrement using bash!! anishkumarv Linux - Newbie 4 09-13-2011 01:19 PM
C programming increment and decrement doubt shariefbe Programming 3 05-26-2010 10:52 AM
How to achieve atomic increment/decrement in Linux silentray Programming 11 01-14-2010 06:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News

All times are GMT -5. The time now is 09:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration