Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6918175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:49:31+00:00 2026-05-27T09:49:31+00:00

I have a server where I upload sometimes the new version of my software.

  • 0

I have a server where I upload sometimes the new version of my software.
For each upload, I have to incremente the build var contained in a file.ver, like #BUILD 345.
Well, I cannot do this everytime manually, but I prefer a smart and fast solution, that increment the number of the version for each upload.

What’s the easiest way?
There is in bash a nice command to do that?
Or a callback method written in C/C++?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:49:31+00:00Added an answer on May 27, 2026 at 9:49 am

    You can use the command sed to replace strings in a file.

    For example, if you have a file myfile with the following content:

    // Some comments
    // Version: #VERSION
    // ...    
    

    You can use the following command to replace the version number:

    sed -i 's/#VERSION/123/g' myfile
    

    The -i means inline, i.e. modify the file content.

    Do not redirect the output of sed back to the same file, as in sed ... myfile > myfile as you will lose the file contents. See Redirect output from sed 's/c/d/' myFile to myFile

    Result:

    // Some comments
    // Version: 123
    // ...  
    

    If you use Ant, this could be useful:

    Use ANT to update build number and inject into source code

    See also the following question related to version numbering (schemes):

    Bumping version numbers for new releases in associated files (documentation)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a server access log, with timestamps of each http request, I'd like
I have a folder in my web server used for the users to upload
I have created a program which allows me to upload images to my server.
My server have default php version of 4, so when I run some script
How to show progress bar in PHP where i have to upload the file
we have recently added a new feature to our software - preview generation for
I want to create a simple file upload server. The server should be able
I am new to iphone, Is it possible to upload uiimage on server without
I have written a small program and server to upload large files over HTTP
Say I want to have a server that can accept 2GB file over network,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.