01-14-2016
Quote:
Originally Posted by
RudiC
I don't think sed can solve this efficiently. How about awk?
I kinda need to use sed for this assignment :/
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
please send the logic or program to find the matching characters between two strings
for ex string1 :abc
string2 :adc
no .of matching characters is 2(a,c) (9 Replies)
Discussion started by: akmtcs
9 Replies
2. Shell Programming and Scripting
#!bin/sh
`clear`
for i in $(seq -w 15 37);
do
#echo $i
wget --dns-timeout=0.0005 http://napdweb${i}.eao.abn-iad.ea.com:8000/webcore/test/test.jsp -o 1
A=`cat 1`
C=$(expr "$A" :... (7 Replies)
Discussion started by: veerumahanthi41
7 Replies
3. Shell Programming and Scripting
Hi,
I have got two variables holding strings, if i echo them, they print the same value but if i compare the condition fails?? can somebody suggest something?? I have checked the word count too, they are also same.
Thanks,
Atul (4 Replies)
Discussion started by: atulmt
4 Replies
4. Programming
In C programming how do i check if a char is equal to a vowel , like a e i o or u, small or big case.
in my function i have the parameter like *word, and i am using word in a for loop, to check if its equal. i use tolower(word)=='a' || .....
but for some reason it only matches on lower case and... (1 Reply)
Discussion started by: omega666
1 Replies
5. UNIX for Dummies Questions & Answers
I have a DNA file like below and I am able to write a short program which finds/not an input motif, but I dont understand how I can include in the code to report which position the motif was found. Example I want to find the first or all "GAT" motifs and want the program to report which position... (12 Replies)
Discussion started by: pawannoel
12 Replies
6. Shell Programming and Scripting
I have a list of file names. However in some instances I might have a "-" at the beginning of the filename or an "=".
For example I might have something like this
set Lst = "file1 file2 file3 -file4 file5="
I want to pick up the ones having "-" at the beginning or "=" and store them in... (22 Replies)
Discussion started by: kristinu
22 Replies
7. Shell Programming and Scripting
I want to compare file 1 to file 2 and if a string from file 1 appears in file 2, then print the file 2 row, where the string appears, onto file3.
file 1 looks like this.
DOG_0004340 blah blah2 j 22424
DOG_3010311 blah blah3 o 24500
DOG_9949221 blah blah6 x 35035
file 2 looks like... (5 Replies)
Discussion started by: verse123
5 Replies
8. Shell Programming and Scripting
Hello All Unix Users,
I am still new to Unix, however I am eager to learn it..
I have 2 files, some lines have some matching substrings, I would like to concatenate these lines into one lines, leaving other untouched. Here below is an example for that..
File 1 (fasta file):
>292183... (6 Replies)
Discussion started by: Mohamed EL Hadi
6 Replies
9. Shell Programming and Scripting
Hi ,
I am writing a shell script to check pvsizes in linux box.
# for i in `cat vgs1`
> do
> echo "########### $i ###########"
> pvs|grep -i $i|awk '{print $2,$1,$5}'>pvs_$i
> pvs|grep -i $i|awk '{print $1}'|while read a
> do
> fdisk -l $a|head -2|tail -1|awk '{print $2,$3}'>pvs_$i1
>... (3 Replies)
Discussion started by: nanduri
3 Replies
10. UNIX for Beginners Questions & Answers
Hello all, I can get close to what I am looking for but cannot seem to hit it exactly and was wondering if I could get your help.
I have the following sample from textfile with many thousands of lines: File 1
PS001,001 HLK
PS002,004 L<G
PS004,002 XNN
PS004,006 BVX
PS004,006 ZBX=... (7 Replies)
Discussion started by: jvoot
7 Replies
fixnt(1) Debian fixnt(1)
NAME
fixnt - Filter for the Windows NT postscript printer driver.
SYNOPSIS
fixnt < BADFILE.ps > GOODFILE.ps
DESCRIPTION
The Windows NT postscript driver has a tendency to make broken postscript files, that are incompatible with psutils. fixnt is a filter
that fixes these problems, allowing the use of psnup(1).
The filter takes the broken postscript file on stdin, and outputs a fixed postscript file on stdout. It has no other form for invocation
and takes no options on the command-line.
OPTIONS
fixnt takes no options.
BUGS
fixnt does not check for NTPSOct94. For a workaround, use a sed(1) command to replace 'NTPSOct94' with 'NTPSOct95', like so:
sed 's/NTPSOct94/NTPSOct95/g'
This is particularly important for Windows NT 3.5 users.
AUTHOR
fixnt was written by Holger Bauer <Holger.Bauer@topmail.de>, Michael Rath <rath@itsm.uni-stuttgart.de>, and Akim Demaille
<demaille@inf.enst.fr>.
REPORTING BUGS
Report bugs to the Authors, but avoid sending large postscript files.
Patches are always welcome; send to <bauer@itsm.uni-stuttgart.de>.
SEE ALSO
psnup(1), sed(1)
a2ps February 2003 fixnt(1)