Very Sorry Rudic i thought my question is looking confusing so i edited to make it more clear.
There is a huge difference between making a request more clear and removing the code about which you were asking questions. And, changing the requirements of your script after people have responded to your original question just confuses readers of your thread who are trying to help you and trying to make sense of the non-sensical responses to a post that no longer matches your original post.
If we go back to your original post (with CODE tags added, as captured in post #2 in this thread) and we assume that your file contains:
then what is assigned to the variable oldnum by the command:
? Is that what you wanted?
What happens when you add 1 to a multi-line non-numeric string value using expr? Does it give you a number or does it print a diagnostic message instead?
If you're unwilling to answer these questions and the questions RudiC asked in post #2, this thread will be closed. We are here to help you learn how to fix your code to get the results you want. We are not here to act as your unpaid programming staff nor to try to guess at what you are trying to do.
I have a file name version.properties with the following data:
major.version=14
minor.version=234
I'm trying to write a grep expression to only put "14" to stdout. The following is not working.
grep "major.version=(+)" version.properties
What am I doing wrong? (6 Replies)
Hi Experts.
I need to install one help library in Fedora 13 and I got the installation document for it:
---------------------------------------------------
users need their own J2EE web application server to be able
to complete this installation. The server must support J2EE - JSP... (3 Replies)
I have a txt file that contains multiple occurrances of:
<MoreFlag>Y</MoreFlag>
I want to update these to:
MorePACFlag>Y</MorePACFlag>
How would I do this?
Cheers
Paul (2 Replies)
I am using a solaris zone in Sun blade-T6320 which has a java version "1.5.0_18" i want to update it to 1.6.0.16 or higher , how can i do that , does i need to add the new java package to the global server or just instal it in the zone itself.
do i need to remove the older version or and install... (1 Reply)
We have a version for every file like RHZ 1.0 / Ver 1.4.2 etc.
Whenever I place a new file with same file name i want the version to get auto upgraded. So can anyone suggest code..
Eg:
RHX 1.0 -> RHZ 1.1
Ver 1.4.2. -> Ver 1.4.3 (1 Reply)
Hello All,
I am trying to upgrade redhat from 5.6 to 5.8.
When i use
Code:
yum update -y
it installs 5.9
I dont want 5.9, instead i would like to upgrade to 5.8
is there anyway to specify a version when you are doing
Code:
yum update (4 Replies)
I have a text file like this:
subject1:LecturerA:10
subject2:LecturerA:40
if I was given string in column 1 and 2 (which are subject 1 and LecturerA) , i need to update 3rd field of that line containing that given string , which is, number 10 need to be updated to 100 ,for example.
The... (6 Replies)
In the awk below I am trying to cp and paste each matching line in f2 to $3 in f1 if $2 of f1 is in the line in f2 somewhere. There will always be a match (usually more then 1) and my actual data is much larger (several hundreds of lines) in both f1 and f2. When the line in f2 is pasted to $3 in... (4 Replies)
I attached both picturehttps://1drv.ms/t/s!Aoomvi55MLAQh1jODfUxa-xurns_ and *.txt file of a sample work file. In this file Reactions which only start with "r1f", "r2f", "r3f"......and so on. And for each reaction the reaction rates is situated couple of lines later with a "+" sign.
For each... (1 Reply)
Discussion started by: Atta
1 Replies
LEARN ABOUT DEBIAN
daptup
DAPTUP(8) System Manager's Manual DAPTUP(8)NAME
daptup - wrapper script on 'apt-get update'
SYNOPSIS
daptup [ --pre | --post | --last ] [ -h | --help ] [ --nocolor ]
OPTIONS --pre Do only 'pre' stage: collect info that will be used as 'old'. Usually need to be specified only in apt hooks.
--post If appropriate option is enabled in config file, do only 'post' stage: collect 'new' info and output changes. Otherwise do nothing.
Usually need to be specified only in apt hooks.
--last Output changes only. This option is supposed to be specified when you want to see changes made in the last update. Note that list of
outdated packages, if daptup is configured to output it, will be rebuilt.
-h --help
prints the help
--nocolor
Disables color output, useful for scripts or when output is not terminal. Now works only with --last option, however, you can dis-
able color globally in configuration file.
daptup is a script that runs "apt-get update" inside and outputs list of packages recently entered to repo, list of packages which got new
updates, list of changes in 'watched' packages and, optionally, list of outdated packages.
Starting with 0.8.0 version, daptup uses apt hooks and you don't need to explicitly call it if you use 'apt-get update'.
TROUBLESHOOTING
If daptup was interrupted while building the lists, the cached lists can stay in inconsistent state, which is inappropriate if you want to
use --last option before the new update. There is nothing to do if interrupt was occured at the moment when old lists were building
(besides running the new update). However, if interrupt was occured when the new lists were building, you can easily redo this stage by
calling 'daptup --post'.
FILES
/etc/daptup.conf
self-documented configuration file
/var/spool/daptup/outdated
cached file with info about outdated packages
SEE ALSO apt-get(8), aptitude(8), apt-show-versions(1p)AUTHOR
daptup was written by Eugene V. Lyubimkin.
This manual page was written by Eugene V. Lyubimkin <jackyf.devel@gmail.com>, for the Debian project (but may be used by others).
Oct 15, 2008 DAPTUP(8)