10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to make ~96 configure files from a template config file which has hundreds of rows that looks like:
template.config:
#average insert size
avg_ins=1000
......
other information omitted
Those config files are named in sequence from S01.config, S02.config, ... etc
with different... (11 Replies)
Discussion started by: yifangt
11 Replies
2. Shell Programming and Scripting
I have few lines in a text file. I am trying to get the line number of uncommented line from the text file using unix shell script.
For example : I want the line number of Orange from the below text file. Here expected answer is 4 since the line 2 is commented.
Apple
#Orange
grapes
Orange (4 Replies)
Discussion started by: Brennon
4 Replies
3. Shell Programming and Scripting
Sed command to replace a line in a file using line number from the output of a pipe.
Is it possible to replace a whole line piped from someother command into a file at paritcular line...
here is some basic execution flow..
the line number is 412
lineNo=412
Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies
4. Shell Programming and Scripting
Hi All,
Can you please guide me to search a string in a particular column of file and return the line number of the line where it was found using awk. As an example :
abc.txt
7000,john,2,1,0,1,6
7001,elen,2,2,0,1,7
7002,sami,2,3,0,1,6
7003,mike,1,4,0,2,1
8001,nike,1,5,0,1,8... (3 Replies)
Discussion started by: arunshankar.c
3 Replies
5. Shell Programming and Scripting
I need some help. I have a file (all.txt) whereby I want to substitute using sed/awk all lines that matches an expression with another line with different expression i.e
subtitute expression,
database_id: filename;
WITH
database_id: PY;
There are many occurrences of the expression... (4 Replies)
Discussion started by: aimsoft
4 Replies
6. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Discussion started by: grc
5 Replies
7. Shell Programming and Scripting
Hi Everybody,
I am trying to write a script that will get some perticuler data from a file and redirect to a file.
My Question is,
I have a Very huge file,In that file I have my required data is started from 25th line and it will ends in 100th line.
I know the line numbers, I need to get all... (9 Replies)
Discussion started by: Anji
9 Replies
8. Shell Programming and Scripting
i have an file ,i want to substitute line
003 M 33 22 22 00
WITH NEW
003 M 24 26 28 00
how can i do it (2 Replies)
Discussion started by: RahulJoshi
2 Replies
9. Shell Programming and Scripting
Hi, I am a newb as far as shell scripting and SED goes so bear with me on this one.
I want to basically append to each line in a file a delimiter character and the line's line number e.g
Change the file from :-
aaaaaa
bbbbbb
cccccc
to:-
aaaaaa;1
bbbbbb;2
cccccc;3
I have worked... (4 Replies)
Discussion started by: pjcwhite
4 Replies
10. Shell Programming and Scripting
Hi all,
I have an xml file which have several sections as the following:
<process-type id="NIR" module-id="OC4J">
<module-data>
<category id="start-parameters">
<data id="java-options" value="-server... (4 Replies)
Discussion started by: nir_s
4 Replies