Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Insert text into a file using shell script Post 302882630 by vbe on Wednesday 8th of January 2014 07:54:33 AM
Old 01-08-2014
That said this look very much homework...
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to run shell command and insert results to existing xml file

Hi. Thanks for any help with this. I'm not new to programming but I am new to shell programming. I need a script that will 1. execute 'df -k' and return the volume names with specific text 2. surround each line of the above results in opening and closing xml tags 3. insert the results of step... (5 Replies)
Discussion started by: littlejon
5 Replies

2. Shell Programming and Scripting

How to insert some constant text at beginig of each line within a text file.

Dear Folks :), I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp. I can do this in vi editor by using this command :g/^/s//BBB_ e,g I have a file named as Test.dat and it containins below text: michal... (4 Replies)
Discussion started by: Muhammad Afzal
4 Replies

3. Shell Programming and Scripting

Need to insert new text and change existing text in a file using SED

Hi all, I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output. sed '$a\ hi... ' shell > shell1 But I face problem when using the same in script. It is throwing the error as, sed: command garbled:... (4 Replies)
Discussion started by: iamgeethuj
4 Replies

4. Shell Programming and Scripting

awk script to insert text in file

I'm in a time crunch here and I don't know how to write scripts. I have a file of data that looks like the following: 1 7.652073E+00 0.000000E+00 7.146691E+02 1.704154E+01 2 7.652068E+00 6.031387E+00 7.146636E+02 2.499305E+01 3 7.645906E+00 1.509455E+01 7.144158E+02 1.822061E+02 4... (7 Replies)
Discussion started by: pk218703
7 Replies

5. Shell Programming and Scripting

Script to insert text from one file to other file

Hello Team, I need help in preparing script which will insert text from one file to other file. I have requirement to prepare script which will insert data from one file to another file. I have tried using sed and awk command but it is not useful to me as it does not append data in the... (12 Replies)
Discussion started by: coolguyamy
12 Replies

6. Shell Programming and Scripting

Korn shell program to parse CSV text file and insert values into Oracle database

Enclosed is comma separated text file. I need to write a korn shell program that will parse the text file and insert the values into Oracle database. I need to write the korn shell program on Red Hat Enterprise Linux server. Oracle database is 10g. (15 Replies)
Discussion started by: shellguy
15 Replies

7. UNIX for Dummies Questions & Answers

Shell script find word from one file and insert in another file

Hi, I am new to shell scripting. I need a bash shell scripts which search and grep a parameter value from input.txt file and insert it in between two semicolon of second line of output.txt file. For example The shell script search an IP address as parameter value from input.txt ... (2 Replies)
Discussion started by: sunilkumarsinha
2 Replies

8. Shell Programming and Scripting

Shell Script to insert text after Tag

Hello, I'm doing an Shell Script to insert a text on XML file, i tried sed, awk, perl... i'm doing something wrong, please help me :) well, the script is a bit large, i get some infos on script before 'run' this part to insert the text on XML... domobile() { let i++ echo ... (1 Reply)
Discussion started by: tassomanoel
1 Replies

9. UNIX for Beginners Questions & Answers

TCL script to insert some text on a file

Hi All , I am looking to create one TCL script to insert one text based on some regular expression match on one file as stated below Input File module (mem1 ,mem2 , bist1 , ten2 , sen1 , land2 , taane2 , ran1 , ran2 , tri2 , tri8 , fly1 , fly2 , san2 ); output ran1 , ran2 , tri2 ,... (1 Reply)
Discussion started by: kshitij
1 Replies
prof(5) 						Standards, Environments, and Macros						   prof(5)

NAME
prof - profile within a function SYNOPSIS
#define MARK #include <prof.h> void MARK(name); DESCRIPTION
MARK introduces a mark called name that is treated the same as a function entry point. Execution of the mark adds to a counter for that mark, and program-counter time spent is accounted to the immediately preceding mark or to the function if there are no preceding marks within the active function. name may be any combination of letters, numbers, or underscores. Each name in a single compilation must be unique, but may be the same as any ordinary program symbol. For marks to be effective, the symbol MARK must be defined before the header prof.h is included, either by a preprocessor directive as in the synopsis, or by a command line argument: cc -p -DMARK work.c If MARK is not defined, the MARK(name) statements may be left in the source files containing them and are ignored. prof -g must be used to get information on all labels. EXAMPLES
In this example, marks can be used to determine how much time is spent in each loop. Unless this example is compiled with MARK defined on the command line, the marks are ignored. #include <prof.h> work( ) { int i, j; . . . MARK(loop1); for (i = 0; i < 2000; i++) { . . . } MARK(loop2); for (j = 0; j < 2000; j++) { . . . } } SEE ALSO
profil(2), monitor(3C) SunOS 5.11 3 Jul 1990 prof(5)
All times are GMT -4. The time now is 09:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy