Not entirely sure what you are after as both columns contain the same data but if want to swap what is in the first column with what is in the second column you could do:
e.g.:
If you want to replace what is in the first column with what is in the second column then you could do:
e.g.
Last edited by TonyFullerMalv; 06-01-2009 at 07:54 PM..
Reason: Second option
Using sed or awk, I need to display text between two words/characters. Below are two example inputs and the desired output. In a nutshell, I need the date-range value between the quotes (but only the first occurance of date-range as there can be more than one).
Example One Input:
xml-report... (1 Reply)
I have a requirement where i have to read from a .sh file a text lying bet characters like 'SELECT' & ';'...Please help me out in this. I am new to shell scripting. (2 Replies)
ok, so i have the following text to replace but it's not working. can someone please help me out:
:%s~awk '// {split($2,s,",");a=$1 FS s} /-/ {b=a} END{print b}'~tail -1~g
I want to replace the entire awk command with tail -1.
thanks (7 Replies)
I have a text file that looks like this:
I want to delete the last character of first column in all rows so that my output looks like this:
Thanks a lot! (1 Reply)
I have a file which looks like this. I only show first 11 lines of the file followed by some text that appears at the end of every file.
1. file:///path1/path2/path3/path4/251192.dat (score 3.849384, docid 142923)
2. file:///path1/path2/path3/path4/173859.dat (score 3.831033, docid 75365)
3.... (4 Replies)
I have a file where the text might exceed 80 characters. I want to have the maximum text lengths to be 80, and cut text from a space.
I written an awk script below but does not seem to work very well
{
gsub("\t"," ")
$0 = line $0
while (length <= WIDTH) {
line = $0
... (3 Replies)
When I use vi to see what's in the file I get this:
int add1(int x) {^M return x + 1;^M}
^Mint subtract1(int x) {^M return x - 1;^M}
^Mint double_it(int x) {^M return x * 2;^M}
^Mint halve_it(int x) {^Mreturn x / 2;^M}
^Mint main() {^M int myint;^M int result;^M ... (2 Replies)
Guys,
I know that the below command will cut the 13th field from test.txt file
awk -F"|" '{print $13}' test.txt
The answer would be,
CA
CN
Ohio
If we see the 3 rd one, it has more than 2 characters. So i wanted to check this in if condition and i want to get the output if the 13th... (4 Replies)
Hi,
I have a large text file with the following format:
>gi|347545744|gb|JN204951.1| Dismorphia spio voucher 5
ATCAAATTCCTTCCTCTCCTTAAA
>gi|17544664774|gb|WN204922.32| Rodapara nigens gene region
CCGGGCAAATTCCTTCCTCTCCTTAAA
>gi|555466400|gb|SG255122.8| Bombyx mandariana genbank 3... (1 Reply)
Hi,
I have a "|" delimited file that is exported from a database.
There is one column in the file which has description/comments entered by some application user. It has "Control-M" character and "New Line" character in between the text.
Hence, when i export the data, this record with the new... (4 Replies)
Discussion started by: tarun.trehan
4 Replies
LEARN ABOUT DEBIAN
roffit
roffit(1) roffit Manual roffit(1)NAME
roffit - convert nroff to HTML
SYNOPSIS
roffit [options] < inputfile > outputfile
DESCRIPTION
roffit converts the inputfile to outputfile. The inputfile must be an nroff formatted man page, and the outputfile will be an HTML docu-
ment.
OPTIONS --bare The output HTML will not include any HTML, HEAD or BODY tags. Also not that when this is selected, there will be no inlined CSS but
you will have to define the necessary classes yourself.
--version
Display version number and exit
--mandir=<dir>
Set a directory in which roffit will check for other man pages (in nroff [name].[num] format) that this one refers to. If found, a
<a href> link will be made to that page with a html extension instead of the number. The file name in the generated link will be
prefixed by the dir given with --hrefdir.
This works for references specified as manpage(3) (within the emhpasis foformatting) and in a plain .BR section (often used in the
SEE ALSO section).
--hrefdir=<dir>
Specify a directory to prefix generated href links created with the --mandir option. This defaults to ".".
CSS CLASSES
h2.nroffsh
The nroff ".SH" section. These are normally the "headlines" before each sub section within the man page.
p.nroffip
The nroff ".IP" section. These are normally the bullet kind used to list each option out of several in a list. Usually followed by a
p.level0 containining the descriptive text.
p.level0
Normal text at the first level. Normally not indented.
p.level1
Text at next logical indent level. Normally indented one level right.
p.level2
Text at the second logical indent level. Normally indented two levels right.
span.bold
Text marked to be bold.
span.manpage
Text marked as a reference to another man page.
span.emphasis
Text marked to be emphasized.
p.roffit
Used for the advertising final paragraph.
WWW
http://daniel.haxx.se/projects/roffit
roffit 0.6 27 Feb 2004 roffit(1)