Sponsored Content
Full Discussion: output text in between
Top Forums Shell Programming and Scripting output text in between Post 302190134 by raffi on Monday 28th of April 2008 06:26:47 PM
Old 04-28-2008
is it possible to use this output to replace text from another file in one command?

ie: replace the "720" in line 1 of a different file with text comtaining "Sieved to 720" with the 2641569270623 we extracted from the original file?

Last edited by raffi; 04-28-2008 at 07:48 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Searching and extracting text from output

I have the following output which I need to obtain the values for "Next Seq is xxx" and "Last Seq is xxx" and "Pending count is xxx". You will notice that the number of words prior to that value can be variable hence the reason for asking this question. LINECMD> Line /xxx///ABC9_SND is UP.... (3 Replies)
Discussion started by: sjday
3 Replies

2. Shell Programming and Scripting

Ping text file of ip addressese and output to text file

I am basically a scripting noob, I have some programming logic, and I wouldn't post here if my 3 hours of searching actually found something. So far this is what I have: " #! /bin/ksh List=./pinglist1.txt cat $List | while read ip do Pingable="" ping $ip -n 2 | awk '/100%/ {print... (11 Replies)
Discussion started by: Lasthitlarry
11 Replies

3. Shell Programming and Scripting

Trying to center my output text

Im stumped on how to center the output of my echo command. I also would like to center my calender too, but is the command to center the same for echo and cal? (3 Replies)
Discussion started by: bri4nd4h3r0
3 Replies

4. UNIX for Dummies Questions & Answers

How to slow down text output?

I found some ascii art that is animated (vt100) and would like to view it properly. However, when I try using 'cat', the file is done almost the instant I press enter. How can I view the file in a slower fashion (similar to the days of 2400baud, for example)? (2 Replies)
Discussion started by: Fangs McWolf
2 Replies

5. Shell Programming and Scripting

Adding Text To |bc Output

Hello. I have this.. $ echo '2+2' | bc 4 But I want to output it as 4 MB So, can I achieve that through one single command line? Thank you. (7 Replies)
Discussion started by: aimy
7 Replies

6. Shell Programming and Scripting

Dynamic output file generation using a input text file with predefined output format

Hi, I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format. Example: File.txt AP|{SSHA}VEEg42CNCghUnGhCVg== APVG3|{SSHA}XK|"password" AP3|{SSHA}XK|"This is test" .... etc --------- test.sh has... (1 Reply)
Discussion started by: hudson03051nh
1 Replies

7. UNIX for Dummies Questions & Answers

Take output of processing in text file

Hi ALL, I am presently using perl script mukesh.pl I just want to catch its output into another text file . So I am using > File.txt . I am getting output but i want the whole processing of the script into that file please let me know . Thanks in advance Cheers Mukesh (1 Reply)
Discussion started by: mumakhij
1 Replies

8. Programming

Save output in text C++

Hi , i want to save the output of my c ++ code to a text file which is in a particular path : this is part of my code and I dunno where I am doing it wrong do { for( int i = 0; i < l; ++i ) { std::cout << 1 + k * i + index << ' '; } ... (2 Replies)
Discussion started by: siya@
2 Replies

9. 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

10. Shell Programming and Scripting

Format text output

Hello, i've got a script based on queries which generates this output into a file cat cron_S-PostGres-ncc_license_Simpel_ActSub_per_Product 201502-b31s31i10 | MVNO | 114751 | 2017-07-19 201502-b31s31i10R60-60 | MVNO | 62115 | 2017-07-19 201511-b31s31i15 ... (5 Replies)
Discussion started by: nms
5 Replies
strmerge(1int)															    strmerge(1int)

Name
       strmerge - batch string replacement

Syntax
       strmerge [ -m prefix ] [ -p patternfile ] [ -s string ] source-program...

Description
       The  command  reads  the strings specified in the message file produced by and replaces those strings with calls to the message file in the
       source program to create a new source program. The new version of source program has the same name as the input source  program,  with  the
       prefix nl_. For example, if the input source program is named the output source program is named You use this command to replace hard-coded
       messages (text strings identified by the command) with calls to the function and to create a source message catalog file. The  source  mes-
       sage  catalog  contains the text for each message extracted from your input source program. The command names the file by appending .msf to
       the name of the input source program. For example, the source message catalog for the program is named You can use the source message cata-
       log as input to the command.

       At  run	time, the program reads the message text from the message catalog.  By storing messages in a message catalog, instead of your pro-
       gram, you allow the text of messages to be translated to a new language or modified without the source program being changed.

       In the source-program argument, you name one or more source programs for which you want strings replaced. The command does not replace mes-
       sages  for source programs included using the directive. Therefore, you might want a source program and all the source programs it includes
       on a single command line.

       You can create a patterns file (as specified by patternfile ) to control how the command replaces text. The patterns file is  divided  into
       several	sections, each of which is identified by a keyword. The keyword must start at the beginning of a new line, and its first character
       must be a dollar sign ($).  Following the identifier, you specify a number of patterns. Each pattern begins on a new line and  follows  the
       regular expression syntax you use in the editor. For more information on the patterns file, see the reference page.

Options
       -m   Add  prefix  to  message  numbers in the output source program and source message catalog.	You can use this prefix as a mnemonic. You
	    must process source message catalogs that contain number prefixes using the option.  Message numbers will be in the form:
	    <prefix><msg_num>

	    Set numbers will be in the form:
	    S_<prefix><set_num>

	    If you process your input source program with this option, the resulting source program and source message catalog may not	be  porta-
	    ble.  For more information, see the Guide to Developing International Software.

       -p   Use  patternfile  to  match strings in the input source program.  By default, the command searches for the pattern file in the current
	    directory, your home directory and finally

	    If you omit the option, the command uses a default patterns file that is stored in

       -s   Write string at the top of the source message catalog. If you omit the option, uses the string specified in the section  of  the  pat-
	    terns file.

Restrictions
       You can specify only one rewrite string for all classes of pattern matches.

       The command does not verify if the message text file matches the source file being rewritten.

       The command does not replace strings to files included with directive. You must run the command on these files separately.

Examples
       The following produces a message file for a program called
       % strextract -p c_patterns prog.c prog2.c
       % vi prog.msg
       % strmerge -p c_patterns prog.c prog2.c
       % gencat prog.cat prog.msf
       % vi nl_prog.c
       % vi nl_prog2.c
       % cc nl_prog.c nl_prog2.c -li

       In this example, the command uses the file to determine which strings to match. The input source programs are named and

       If  you	need  to  remove  any  of the messages or extract one of the created strings, edit the resulting message file, Under no conditions
       should you add to this file. Doing so could result in unpredictable behavior.

       You issue the command to replace the extracted strings with calls to the message catalog.  In response to this command, creates the  source
       message catalogs, and and the output source programs, and

       Before compiling the source programs, you must edit and to include the appropriate and function calls.

       The command creates a message catalog and the command creates an executable program.

See Also
       intro(3int), extract(1int), gencat(1int), strextract(1int), trans(1int), regex(3), catopen(3int), catgets(3int), patterns(5int)
       Guide to Developing International Software

																    strmerge(1int)
All times are GMT -4. The time now is 03:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy