06-22-2010
How to substitute in a large gz file?
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?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
well i have this file here:
<XML>
<pregate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<system_c>HPREGATE</system_c>
<trans_c>HSPG</trans_c>
<trans_dt>20060105161333</trans_dt>
<user_id_m></user_id_m>
<func_c>C</func_c>
</pregate>
</XML>
i want to... (2 Replies)
Discussion started by: forevercalz
2 Replies
2. 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
3. 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
4. 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
5. Shell Programming and Scripting
Hi,
I am new to this forum and my script skills are very weak.
I have this file (file 1) that contains 3 columns (tab delimited):
kyle start stop
john start stop
joe start stop
And I want to replace name (column 1) from another file. This other file has two columns, one is the... (4 Replies)
Discussion started by: kylle345
4 Replies
6. 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
7. Shell Programming and Scripting
Hi experts :)
I need to replace special characters into a file , in the followiing way :
" --> ""
' --> ''
_--> \_
I tried with the sed command but I'm getting and error ksh: $: not found.
ksh: $: not found.
sed: Function s/\/\/ cannot be parsed.
Any idea ?
Thanks ,
KOLAS... (2 Replies)
Discussion started by: Kolas79
2 Replies
8. Shell Programming and Scripting
Dear All,
I would like to instantiate a "pattern file" substituting "variable name" by their content.
Saying, we have:
1/ a "pattern file" containing different "variable name", the first character of the "variable name" is "@":
$ cat TPTModl.txt
DEFINE... (12 Replies)
Discussion started by: dae
12 Replies
9. 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
10. Shell Programming and Scripting
Team,
I want to change below parameter in all the files in a directory,
Check for HOSTNAME=`hostname`
Change to HOSTNAME=localhost
And I tried below but, its not working ☹
find /tmp -type f -exec sed 's/"HOSTNAME\=\`hostname\`"/"HOSTNAME\=localhost/g'"
Help me if I am missing... (6 Replies)
Discussion started by: natraj005
6 Replies
LEARN ABOUT DEBIAN
fsaparse
fsaparse(3gv) fsaparse(3gv)
NAME
fsaparse - parse a word-acceptor automaton file
SYNOPSIS
#include "wa.h"
fsafparse(fp, fsa)
FILE *fp;
Fsa *fsa;
DESCRIPTION
fsafparse parses a word-acceptor automaton file in the format described by DEAGL ("Data Exchange for Automata and Groups Language") (but
see the BUGS section below). fp should be a pointer to an open file containing the automaton. fsa should be a pointer to an Fsa struture
as defined in "fsa.h". Upon return, the automaton will have been written into this structure.
RETURN VALUES
On success, fsafparse() returns 1. On failure, it returns 0.
SEE ALSO
getwordlist(3), getmatlist(3), fgetmatlist(3),
getmatlist(1), automata(1)
BUGS
fsafparse is meant specifically for use with getwordlist(3) and getmatlist(3). It does not recognize the full language described by DEAGL.
It only recognizes that part of it which was present in the word-acceptor files that I was working with when I wrote it. I think this may
be sufficient for all word-acceptor automata, but I am not sure of this. Please let me know if you find word-acceptor files for which this
doesn't work.
AUTHOR
Mark Phillips
The Geometry Center
Sat Mar 23 22:01:32 1991 fsaparse(3gv)