Hi
I have a file with the records
1 A B C D
2 E F G H
3 I J K L
4 M N O P
In the ouput I want
1 A B C D 2 # F G H
3 I J K L 4 M N O P
How to achieve this? (10 Replies)
I tried to put the history line number and the date into the file with one command, and failed. Can't figure out how to get the date variable substituted for the last space captured.
history | tail -1 | sed -e 's/.\{7\}/&/g' | head -1 | sed 's/ $/$date/'
Result was:
729 $date
So, I... (8 Replies)
Hello,
I want to combine 2 lines in one
I have a text file
example:
bla123 blo31 xx:yy:zz
->bla43 bli532 00:01:02
bla1237 blo351 aa:ss:dd
->bla433 bli34332 55:10:28
I want the result to be:
bla123 blo31 xx:yy:zz, ->bla43 bli532 00:01:02
bla1237 blo351 aa:ss:dd, ->bla433 bli34332... (3 Replies)
All,
i am new to linux script...
source
Filter: vlan281-BUM-5M
BUM-5M 0 0
Filter: vlan282-BUM-5M
BUM-5M 0 0
Filter: vlan2828-BUM-5M
Filter:... (2 Replies)
Hi All,
I am trying to understand if its possible to carry out the following.
I have a text file which contains output from multiple commands, within the file a node will be quiered twice if there was 2 commands for example. Is it possible do combine 2 lines into 1 if the first word is the... (1 Reply)
In the awk below, what I am attempting to do is check each line in the tab-delimeted input, which has ~20 lines in it, for a keyword
SVTYPE=Fusion. If the keyword is found I am splitting $3 using the . (dot) and reading the portion before and after the dot in an array a.
If it does have that... (12 Replies)
I have been searching and trying to come up with an awk that will perform the following on a
converted text file (original is a pdf).
1. Since the first two lines are (begin with) text they are removed
2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT MOJAVE
b::terse5.18
B::Terse(3pm) Perl Programmers Reference Guide B::Terse(3pm)NAME
B::Terse - Walk Perl syntax tree, printing terse info about ops
SYNOPSIS
perl -MO=Terse[,OPTIONS] foo.pl
DESCRIPTION
This module prints the contents of the parse tree, but without as much information as B::Debug. For comparison, "print "Hello, world.""
produced 96 lines of output from B::Debug, but only 6 from B::Terse.
This module is useful for people who are writing their own back end, or who are learning about the Perl internals. It's not useful to the
average programmer.
This version of B::Terse is really just a wrapper that calls B::Concise with the -terse option. It is provided for compatibility with old
scripts (and habits) but using B::Concise directly is now recommended instead.
For compatibility with the old B::Terse, this module also adds a method named "terse" to B::OP and B::SV objects. The B::SV method is
largely compatible with the old one, though authors of new software might be advised to choose a more user-friendly output format. The
B::OP "terse" method, however, doesn't work well. Since B::Terse was first written, much more information in OPs has migrated to the
scratchpad datastructure, but the "terse" interface doesn't have any way of getting to the correct pad. As a kludge, the new version will
always use the pad for the main program, but for OPs in subroutines this will give the wrong answer or crash.
AUTHOR
The original version of B::Terse was written by Malcolm Beattie, <mbeattie@sable.ox.ac.uk>. This wrapper was written by Stephen McCamant,
<smcc@MIT.EDU>.
perl v5.18.2 2013-11-04 B::Terse(3pm)