Sponsored Content
Full Discussion: Sorting content of file
Top Forums Shell Programming and Scripting Sorting content of file Post 302550283 by linuxgeek on Thursday 25th of August 2011 07:58:21 AM
Old 08-25-2011
it doesn't work redirecting the output on the same file.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sorting file content on columns

guys i have a question: i'd like to sort files (as many I want) in columns so to visualize them one near the other...so let's say i have just 2 files: FILE1 John Mary Bridget FILE2 Anne Robert Mark i would like to obtain: John Anne Mary Robert Bridget ... (2 Replies)
Discussion started by: marshmallow
2 Replies

2. Shell Programming and Scripting

Finding & Moving Oldest File by Parsing/Sorting Date Info in File Names

I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves. Also, the script should only move a file from /exports to... (6 Replies)
Discussion started by: nikosey
6 Replies

3. UNIX for Dummies Questions & Answers

sorting s file

how would i sort a file on the third column based on numerical value instead of the ASCII order? (1 Reply)
Discussion started by: trob
1 Replies

4. UNIX for Dummies Questions & Answers

Sorting data in file based on field in another file

Hi, I have two files, one of which I would like to sort based on the order of the data in the second. I would like to do this using a simple unix statement. My two files as follows: File 1: 12345 1 2 2 2 0 0 12349 0 0 2 2 1 2 12350 1 2 1 2 2 2 . . . File2: 12350... (3 Replies)
Discussion started by: kasan0
3 Replies

5. Emergency UNIX and Linux Support

Sorting file content by file extensions

Hi Experts, I have one .txt file which has filenames with various extensions e.g. .gz,.dat,.CTL,.xml. I want to sort all the filenames as per their extensions and would like to delete all the file names with .xml extension. Please help. PS : I am using Sun OS Generic_122300-60. ... (9 Replies)
Discussion started by: ajaypatil_am
9 Replies

6. Shell Programming and Scripting

Sed: replace content from file with the content from file

Hi, I am having trouble while using 'sed' with reading files. Please help. I have 3 files. File A, file B and file C. I want to find content of file B in file A and replace it by content in file C. Thanks a lot!! Here is a sample of my question. e.g. (file A: a.txt; file B: b.txt; file... (3 Replies)
Discussion started by: dirkaulo
3 Replies

7. Shell Programming and Scripting

Sorting content between match pattern and move on with awk and sed

S 0.0 0.0 (reg, inst050) k e f d c S 0.0 0.0 (mux, m030) k g r s x v S 0.0 0.0 (reg, inst020) q s n m (12 Replies)
Discussion started by: ctphua
12 Replies

8. Shell Programming and Scripting

How to remove exisiting file content from a file and have to append new file content?

hi all, i had the below script x=`cat input.txt |wc -1` awk 'NR>1 && NR<'$x' ' input.txt > output.txt by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies

9. Shell Programming and Scripting

Sorting from file

Im trying to write a script to make a hockey-table. I have a textfile containing information from a previous season like this Example Round:1 20020923:Leksands IF-Brynäs IF:2-3 : (1-1,0-1,1-1):6298:Leksands Isstadion 20020924:Linköpings HC-Djurgårdens IF:3-0 : (0-0,2-0,1-0):4587:Stångebro... (5 Replies)
Discussion started by: Alimun
5 Replies

10. Shell Programming and Scripting

List the files after sorting based on file content

Hi, I have two pipe separated files as below: head -3 file1.txt "HD"|"Nov 11 2016 4:08AM"|"0000000018" "DT"|"240350264"|"56432" "DT"|"240350264"|"56432" head -3 file2.txt "HD"|"Nov 15 2016 2:18AM"|"0000000019" "DT"|"240350264"|"56432" "DT"|"240350264"|"56432" I want to list the... (6 Replies)
Discussion started by: Prasannag87
6 Replies
mm(1)							      General Commands Manual							     mm(1)

NAME
mm, osdd - print documents formatted with the mm macros SYNOPSIS
[options] [files] [options] [files] DESCRIPTION
can be used to format and print documents using and the text-formatting macro package (see nroff(1)). It has options to specify prepro- cessing by and/or (see tbl(1) and neqn(1)), and postprocessing by various terminal-oriented output filters. The proper pipelines and the required arguments and flags for and are generated, depending on the options selected. is equivalent to the command Options recognizes the following options and command-line arguments. Any other arguments or options (such as are passed to or to as appropriate. Such options can occur in any order, but they must appear before the files arguments. If no arguments are given, prints a list of its options. Specifies the type of output terminal; for a list of recognized values for term, type If this option is used, uses the value of the shell variable from the envi- ronment (see profile(4) and environ(5)) as the value of term if is set; otherwise, uses as the value of term. If several terminal types are specified, the last one is used. Indicates that the document is to be produced in 12-pitch. Can be used when is set to one of and (The pitch switch on the DASI 300 and 300s terminals must be manually set to if this option is used.) Causes to invoke col(1); note that col(1) is invoked automatically by unless term is one of and Causes to invoke Causes to invoke Invokes the option of DIAGNOSTICS
sends the message if none of the arguments is a readable file and is not used as a filter. EXAMPLES
Assuming that the shell variable is set in the environment to the two command lines below are equivalent: reads the standard input when is specified instead of any file names (mentioning other files along with leads to disaster). This option allows to be used as a filter, as in this example: Hints o invokes with the option. With this option, assumes that the terminal has tabs set every 8 character positions. o Use the option of to specify ranges of pages to be output. Note, however, that if invoked with one or more of the and options, together with the option of may cause a harmless ``broken pipe'' diagnostic if the last page of the document is not specified in list. o If you use the option of (to stop between pages of output), use line-feed (rather than return or new-line) to restart the output. The option of does not work with the option of or if automatically invokes (see option above and col(1)). o If you specify an incorrect output terminal type, produces (often subtle) unpredictable results. However, if you are redirecting output into a file, use the option, then use the appropriate terminal filter when actually printing the formatted file. SEE ALSO
col(1), env(1), nroff(1), tbl(1), profile(4), term(4), mm(5). mm(1)
All times are GMT -4. The time now is 10:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy