Sponsored Content
Top Forums Shell Programming and Scripting insert filename into file using SED (or AWK) Post 302083476 by USER#5 on Sunday 6th of August 2006 06:06:04 PM
Old 08-06-2006
insert filename into file using SED (or AWK)

Hi,
I would like to insert a file's filename into the first line of that file - for a batch of files. Is this possible using SED? Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed, insert data from a file to another?

Hello, I have 2 files. File1 has data I wrote, and File2 is a file created by an application. I would like to insert the data from File1 into File2, but it has to be inserted at a certain location on File2. I know I need to search for "</jsp-param> </jsp-descriptor>" But I don't know... (4 Replies)
Discussion started by: ctcuser
4 Replies

2. Shell Programming and Scripting

sed/awk to insert comment at defined line number

Hi there, may someone easily help me on this : I want to insert a text in a specific line number like : linenumb2start=`cat memory_map.dld | nl -ba | egrep -i "label" | cut -f1` line2insert=`expr $linenumb2start + 2` and now I need to replace something like {} with {comment} at... (8 Replies)
Discussion started by: homefp
8 Replies

3. Shell Programming and Scripting

sed/awk script selective insert between lines

Hi I have a file in the foll. format *RECORD* *FIELD NO* ....... ....... *FIELD TX* Data *FIELD AV* Data *FIELD RF* *RECORD* *FIELD NO* ....... ....... *FIELD TX* Data *FIELD RF* (4 Replies)
Discussion started by: dunstonrocks
4 Replies

4. Shell Programming and Scripting

sed/awk to insert multiple lines before pattern

I'm attempting to insert multiple lines before a line matching a given search pattern. These lines are generated in a separate function and can either be piped in as stdout or read from a temporary file. I've been able to insert the lines from a file after the pattern using: sed -i '/pattern/... (2 Replies)
Discussion started by: zksailor534
2 Replies

5. Shell Programming and Scripting

Sed Insert file between tags

Hi, I have a file which has the following tags in it: ####STARTTAG###### (Then 40 lines of whitespace) ####ENDTAG######## What I would like to do (using sed) is to insert a another (variable length) file between these two tags..... I have read examples and manuals... (0 Replies)
Discussion started by: yonderboy
0 Replies

6. Shell Programming and Scripting

Insert missing field using perl,sed,awk

sample file (comma as field separators) MessageFlow,1,BusIntBatchMgr,a OOBEvent,1,BusIntBatchMgr,a TaskEvents,1,,a MTTrace,1,,a MTWarning,,1,a MessageFlow,1,Batch,a OOBEvent,1,Batch,a TaskEvents,1,,a EAISAPIdocWizard,1,BusIntMgr,a EAISAPBAPIWizard,1,BusIntMgr,a... (3 Replies)
Discussion started by: vrclm
3 Replies

7. Shell Programming and Scripting

Insert field between two fields using awk or sed

Hi All, I am trying to insert two columns in the following text. I tried awk but failed to achieve. Highly appreciate your help DATETIME="28-Sep-2013;20:09:08;" CONTROL="AB" echo "Myfile.txt;11671;7824.90;2822.48" The DATETIME will be inserted at the beginning and CONTROL will... (4 Replies)
Discussion started by: angshuman
4 Replies

8. Shell Programming and Scripting

sed and awk to insert a line after a para

hi I am having a file like this ############################## mod1 ( a(ll) , b( c), try(o) , oll(ll) go(oo) , al(ll) mm(al) , lpo(kka) kka(oop) ); mod2 ( jj(ll) , c( kk), try1q(o1) , ofll(lll) gao(oo1) , ala(llaa) mmf(adl) , lddpo(kkad) kkda(oodp) );... (20 Replies)
Discussion started by: kshitij
20 Replies

9. Shell Programming and Scripting

Insert a value in a pipe delimited line (unsig sed,awk)

Hi, I want to insert a value (x) in the 3rd position of each line in a file like below a|b|c|d|1 a|b|c|d a|b|c|d|e|1 a|b|cso that output file looks like a|b|x|c|d|1 a|b|x|c|d a|b|x|c|d|e|1 a|b|x|cI can do that using perl as below #!/usr/bin/perl -w use strict; #inserting x at... (5 Replies)
Discussion started by: sam05121988
5 Replies

10. UNIX for Beginners Questions & Answers

Insert the line number from text file to filename output

Hi everyone :) I have a file "words.txt" containing hundreds of lines of text. Each line contains a slogan. Using the code below i am able to generate an image with the slogan text from each line. The image filename is saved matching the last word on each line. Example: Line 1: We do... (2 Replies)
Discussion started by: martinsmith
2 Replies
COQ(1)							      General Commands Manual							    COQ(1)

NAME
coqtop - The Coq Proof Assistant toplevel system SYNOPSIS
coqtop [ options ] DESCRIPTION
coqtop is the toplevel system of Coq, for interactive use. It reads phrases on the standard input, and prints results on the standard out- put. For batch-oriented use of Coq, see coqc(1). OPTIONS
-h, --help Help. Will give you the complete list of options accepted by coqtop. -I dir, --include dir add directory dir in the include path -R dir coqdir recursively map physical dir to logical coqdir -top coqdir set the toplevel name to be coqdir instead of Top -inputstate filename, -is filename read state from file filename.coq -nois start with an empty initial state -outputstatefilename write state in file filename.coq -load-ml-object filename load ML object file filenname -load-ml-source filename load ML file filename -load-vernac-source filename, -l filename load Coq file filename.v (Load filename.) -load-vernac-source-verbose filename, -lv filename load verbosely Coq file filename.v (Load Verbose filename.) -load-vernac-object filename load Coq object file filename.vo -require filename load Coq object file filename.vo and import it (Require Import filename.) -compile filename compile Coq file filename.v (implies -batch ) -compile-verbose filename verbosely compile Coq file filename.v (implies -batch ) -opt run the native-code version of Coq -byte run the bytecode version of Coq -where print Coq's standard library location and exit -v print Coq version and exit -q skip loading of rcfile -init-file filename set the rcfile to filename -user uid use the rcfile of user uid -batch batch mode (exits just after arguments parsing) -boot boot mode (implies -q and -batch ) -emacs tells Coq it is executed under Emacs -dump-glob filename dump globalizations in file f (to be used by coqdoc(1) ) -with-geoproof (yes|no) to (de)activate special functions for Geoproof within Coqide (default is yes ) -impredicative-set set sort Set impredicative -dont-load-proofs don't load opaque proofs in memory -xml export XML files either to the hierarchy rooted in the directory $COQ_XML_LIBRARY_ROOT (if set) or to stdout (if unset) -quality improve the legibility of the proof terms produced by some tactics SEE ALSO
coqc(1), coq-tex(1), coqdep(1). The Coq Reference Manual. The Coq web site: http://coq.inria.fr October 11, 2006 COQ(1)
All times are GMT -4. The time now is 06:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy