10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a file like this.
1 aaa bcd 1 56 xyz 1
2 ccc rrr 1 25 512 1
1 zaz eee 1 55 511 1
I want to change middle 1's ie after bcd,rrr,eee to 0 where as other 1's
should not change.
Can you please provide a solution . (5 Replies)
Discussion started by: kshari8888
5 Replies
2. 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
3. Shell Programming and Scripting
not getting anywhere with this
an xml file contains multiple clients set up with same tags, different values.
I need to parse the file for client foo, and change the value of tag "64bit" from false to true.
cat clients.xml
<Client type"FIX">
<ClientName>foo</ClientName>... (3 Replies)
Discussion started by: jack.bauer
3 Replies
4. UNIX for Dummies Questions & Answers
I have the below 2 files:
1) Third field from file1.txt should be compared to the first field of lookup.txt.
2) If match found then third field, file1.txt should be substituted with the second field from lookup.txt.
3)Else just print the line from file1.txt.
File1.txt:... (4 Replies)
Discussion started by: venalla_shine
4 Replies
5. Shell Programming and Scripting
Hi guys,
is there are way to substitute the content of certain line in the file by another entry if line number is available?
For example, I have a variable A="HCMLPBBG" and a file MYFILE.
I need to substitute entry on line 18168 of MYFILE with the value of the variable "A".
Is there a way to... (1 Reply)
Discussion started by: aoussenko
1 Replies
6. 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
7. Shell Programming and Scripting
I have a large .gz file where i wish to replace the occurrence of a particular word with another word.. Can anyone help?I prefer a short script..
Can sed work with gz files? (5 Replies)
Discussion started by: maximus8886
5 Replies
8. UNIX for Dummies Questions & Answers
correct file names are:
*_0.txt
*_1.txt
incorrect file names are:
*_12.txt
*_0123.txt
*_04321.txt
all files that are incorrect need to replace the ending with *_1.txt
therefore need to create a loop to find the wrong files in a dir ->that dont end in _1.txt or _0.txt and then... (3 Replies)
Discussion started by: sigh2010
3 Replies
9. Shell Programming and Scripting
Hi all
I am in a small problem pl help me out.
I am having a directory having ZIP files with name starting as :
01.xyz
02.pqr
and so on
I want to run the script-
cat myfile | awk '{print $1, $2}' | while read var1 var2
do
zcat $var2* | grep "^000$var1" >> my_output
done
Where the... (22 Replies)
Discussion started by: vanand420
22 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