Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Search a string and display its location on the entire string and make a text file Post 302995034 by RudiC on Friday 31st of March 2017 05:10:28 AM
Old 03-31-2017
Did you consider redirecting the output?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

appending string to text file based on search string

Hi, I need to append string "Hi" to the beginning of the lines containing some specific string. How can I achieve that? Please help. Malay (1 Reply)
Discussion started by: malaymaru
1 Replies

2. Shell Programming and Scripting

Search a string and append text after the string

Hi, I have a file like this... <o t="Batch" id="8410" p="/" g="32"> <a n="name"> <v s="DBBA1MM"/> </a> <a n="owner"> <v r="/Administrator"/> </a> <a n="rights"> <v s="95"/> </a> <a n="debugLevel"> <v s="3"/> </a> <a n="avsStoreLoc"> <v... (8 Replies)
Discussion started by: kesu2k
8 Replies

3. UNIX for Dummies Questions & Answers

Search for a string and copy the entire line

Hello All, I am after the script or the command which can scan the entire file for a string $PART_ID and when found to extract/copy the corresponding $PART_ID value (e.g THIRE_PTY_SOFTWARE for the 1st occurance of $PART_ID in the attached file) to a file. Appreciate your help. Thanks in... (3 Replies)
Discussion started by: forumthreads
3 Replies

4. Shell Programming and Scripting

search for a string in a text file

I want to write a script to check for duplicates For example: I have a text file with information in the format of /etc/passwd alice:x:1008:555:William Williams:/home/bill:/bin/bash bob:x:1018:588:Bobs Boos:/home/bob:/bin/bash bob:x:1019:528:Robt Ross:/home/bob:/bin/bash james:x:1012:518:Tilly... (3 Replies)
Discussion started by: ixDLxi
3 Replies

5. Shell Programming and Scripting

Search a string in a text file and add another string at the particular position of a line

I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies

6. Shell Programming and Scripting

Search a string in a text file and add another string at the end of line

Dear All I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies

7. Shell Programming and Scripting

Search string within a file and list common words from the line having the search string

Hi, Need your help for this scripting issue I have. I am not really good at this, so seeking your help. I have a file looking similar to this: Hello, i am human and name=ABCD. How are you? Hello, i am human and name=PQRS. I am good. Hello, i am human and name=ABCD. Good bye. Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies

8. Programming

Search a string in a text file in C

Hello guys, i want some help please in coding that program , " A mini dictionary" the file looks like : Waver --- To be hesitated retirement --- life after end of career The user enter the word , and then it prints the meaning of it Please use CODE tags when... (4 Replies)
Discussion started by: Alyy
4 Replies

9. Shell Programming and Scripting

To Search for a string and to extract the string from the text

Hi Team I have an huge xml where i need to search for a ceratin numbers. For example 2014-05-06 15:15:41,498 INFO WebContainer : 10 CommonServicesLogs - CleansingTriggerService.invokeCleansingService Entered PUBSUB NOTIFY MESSAGE () - <?xml version="1.0" encoding="UTF-8"... (5 Replies)
Discussion started by: Kannannair
5 Replies

10. Shell Programming and Scripting

Read in search strings from text file, search for string in second text file and output to CSV

Hi guys, I have a text file named file1.txt that is formatted like this: 001 , ID , 20000 002 , Name , Brandon 003 , Phone_Number , 616-234-1999 004 , SSNumber , 234-23-234 005 , Model , Toyota 007 , Engine ,V8 008 , GPS , OFF and I have file2.txt formatted like this: ... (2 Replies)
Discussion started by: An0mander
2 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 02:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy