Hi,
I have a data file with following structure:
a|b|c|d|3|f1|f2|f3
a|b|c|d|5|f1|f2|f3|f4|f5
I want to change this data to:
a|b|c|d|3|f1;f2;f3
a|b|c|d|5|f1;f2;f3;f4;f5
Data in column 5 tells the number of following fields. All fields delimiter after the 5th column needs to be... (6 Replies)
Hi everyone,
I am attempting to do something that should be very simple. How do I replace a specific line of a file with different text, and then save that file to its original name? I believe I want to use the sed command with the c option, but I after trying many times, I can't get the right... (10 Replies)
Hi
Very much a newbie to UNIX & scripting, but have identified an area within work that would benefit from being automated, as its repeated manually very often, and it looks like the ideal first script!
What I need to do is change directory to a users home (cd ~), and then find and remove a... (6 Replies)
I need to change a line from a xen cfg file using sed if it's possible. The original line is:
vif =
I want to change ONLY the IP address of the second part ==> ip=10.1.10.4 to another IP --> ip=192.222.11.6 The first one ip=123.456.789.123 keeps untouchable.
My new line shoud... (9 Replies)
Hello
My problem is that I want to change some specific numbers in a file. It is like,
2009 10 3 2349 21.3 L 40.719 27.388 10.8 FRO 7 0.8 1.1LFRO 2.6CFRO 1.1LMAM1
GAP=157 1.69 5.7 5.9 5.8 0.5405E+01 0.4455E+00 0.1653E+02E
STAT SP IPHASW D HRMM SECON CODA AMPLIT... (11 Replies)
Dear All,
New to Linux/Unix OS, my Linux version is 2010 x86_64 x86_64 x86_64 GNU/Linux
As titled, I wonder if you can help to provide a solution to find and change an specific string in a file
The file include a lots of data in following configuration but might be various in... (3 Replies)
I need to get notification via email when the line containing a pattern is changed in a file. Not during the time any changes to file occurs. Ie if we reset a user password say example, demouser the hash in the line containing the word demouser in the file /etc/group changes. So when this change... (1 Reply)
hi Guys,
this is my requirement, there is a huge xml file of this i have to change 3 lines with out opening the file
/users/oracle > cat lnxdb-pts-454.xml|egrep "s_virtual|s_cluster|s_dlsnstatus"
<cluster_port oa_var="s_clusterServicePort">9998</cluster_port>
<host... (2 Replies)
Goodmorning,
I know how to cut a string and a column, and how to find a word.
I have a file with over 100 columns. All columns have a title in the first line. I have to delete all columns with the XXX title.
I can't use cut -f because the position of XXX columns change in each file, and in... (14 Replies)
I am trying to use awk to change a specific string in a field, if it is found, to another value. In the tab-delimited file the text in bold in $3 contains the string 23, which is always right before a ., if it is present.
I am trying to change that string to X, keeping the formatting and the... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT LINUX
dpkg::changelog::entry::debian
Dpkg::Changelog::Entry::Debian(3) libdpkg-perl Dpkg::Changelog::Entry::Debian(3)NAME
Dpkg::Changelog::Entry::Debian - represents a Debian changelog entry
DESCRIPTION
This object represents a Debian changelog entry. It implements the generic interface Dpkg::Changelog::Entry. Only functions specific to
this implementation are described below.
VARIABLES
$regex_header, $regex_trailer are two regular expressions that can be used to match a line and know whether it's a valid header/trailer
line.
The matched content for $regex_header is the source package name ($1), the version ($2), the target distributions ($3) and the options on
the rest of the line ($4). For $regex_trailer, it's the maintainer name ($1), its email ($2), some blanks ($3) and the timestamp ($4).
FUNCTIONS
my @items = $entry->get_change_items()
Return a list of change items. Each item contains at least one line. A change line starting with an asterisk denotes the start of a
new item. Any change line like "[ Raphael Hertzog ]" is treated like an item of its own even if it starts a set of items attributed to
this person (the following line necessarily starts a new item).
my @errors = $entry->check_header()
my @errors = $entry->check_trailer()
Return a list of errors. Each item in the list is an error message describing the problem. If the empty list is returned, no errors
have been found.
$entry->normalize()
Normalize the content. Strip whitespaces at end of lines, use a single empty line to separate each part.
UTILITY FUNCTIONS
my @closed_bugs = find_closes($changes)
Takes one string as argument and finds "Closes: #123456, #654321" statements as supported by the Debian Archive software in it. Returns all
closed bug numbers in an array.
AUTHOR
Raphael Hertzog <hertzog@debian.org>.
1.16.0.3 2012-04-17 Dpkg::Changelog::Entry::Debian(3)