sed, awk, or something...help meeeeeeeeeee
by Ranbir
Hi All,
I don't know if I should use sed for what I'm about to ask, but it seems
like a good idea. If awk is better, or something else entirely, that's
fine too.
I have two files. File "1" looks like this:
AA
BB
CC
DD
AA
BB
CC
DD
File "2" looks like this:
BBBB1
BBBB2
BBBB3
So, "BB" in file "1" always occurs in the same spot (i.e. between lines
AA and CC). Knowing that, how do I replace the first occurrence of "BB"
in file "1" with "BBBB1" from file 2, the second occurrence of "BB" in
file "1" with "BBBB2" from file 2, and so on?
I think a bash 'for' or 'while' loop may be useful here, too. But, it's
the sed/awk/whatever bits I don't know how to do. I've read some of the
man/info page, looked up sed help on the net, etc. I'm still not sure
how to do the above with sed.
Thanks in advance!
Regards,
Ranbir
--
Kanwar Ranbir Sandhu
Linux 2.6.27.30-170.2.82.fc10.x86_64 x86_64 GNU/Linux
13:29:18 up 9 days, 3:04, 3 users, load average: 1.13, 0.37, 0.18
14 years, 7 months
I think something is 'stuck' on the fedoara-list ?!?
by Bill Case
Hi;
I have sent 2 or three posts to the mailing list but have not received a
return copy of those posts.
I have double checked the archive list and the posts are there. My user
profile is checked 'yes' to receive a copy of my own posts. It has
always worked up to a couple of days ago.
Is there a problem anyone knows about?
--
Regards Bill
Fedora 11, Gnome 2.26.3
Evo.2.26.3, Emacs 23.1.1
14 years, 7 months
Power cut woes
by Philip Heron
Hi all,
I have an old PC running F10, setup to play a simple animation in a
display. Nothing fancy. Yesterday the town was hit with a series of
power cuts which seems to have well and truely mucked it up. I took a
picture of the kind of errors I'm getting:
http://www.bacomponents.co.uk/f10-startup-errors.jpeg
The HAL bit sits for ages, then the screen blanks. X fails to start,
trying to login on the console gives me a password error, and ssh fails
to connect. I've run e2fsck on the disk and it seems fine.
Should I just nuke it and start again? Or is there a handy way to fix it?
-Phil
14 years, 7 months
bind-chroot directory permissions?
by Tom Horsley
I recently enabled dynamic DNS for the virtual machines I've
been installing and named started getting errors (running
as chroot) trying to write .jnl files to the /var/named
directory under the chroot. Fixing the directory to
be root:named 770 instead of root:named 750 took care of
that.
Then with the recent update of bind and bind-chroot, I started
seeing these messages in the log:
Sep 25 08:03:21 zooty named[12710]: dumping master file: tmp-PDw9vymVVL: open: permission denied
I'm not sure what directory it is trying to write those
in, but I found and chmodded a few more directories
and haven't seen one of those messages since.
Should directory permissions be adjusted in one or more
of the rpms to take these things into account?
14 years, 7 months
scim - Fedora 11
by Craig White
Maybe it's me and my lack of understanding about this but it seems that
since I updated to Fedora 11, that scim-python works only in KDE
programs like Kwrite, Konsole but not in gnome (evolution, pidgin, OOo).
No matter what I do in those 3 programs, I only have English for input
language, even if the SCIM icon in the system tray shows 'Python Pin
Yin'
$ rpm -qa|grep scim
scim-1.4.8-3.fc11.i586
scim-python-pinyin-0.1.13rc1-5.fc11.i586
scim-libs-1.4.8-3.fc11.i586
scim-python-0.1.13rc1-5.fc11.i586
$ rpm -qa|grep zh
autocorr-zh-3.1.1-19.2.fc11.i586
openoffice.org-langpack-zh_CN-3.1.1-19.2.fc11.i586
Am I missing something? Is there a gnome package that's needed?
I don't mean to make this a question for Ed. ;-)
Craig
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
14 years, 7 months
How to install Apache w/ PHP when "yum install httpd php" fails?
by Kelly Jones
I did "yum install httpd php" to install Apache w/ PHP, and created a
test page with "<?php phpinfo(); ?>". When I visit it and view source,
I get back "<?php phpinfo(); ?>" instead of my PHP config.
/etc/httpd/conf/httpd.conf says nothing about PHP, so I suspect I did
the install wrong.
How do I enable PHP support in Apache?
--
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
14 years, 7 months
Re: I can't connect via ssh
by Erik Hemdal
.
> Message: 2
> Date: Sat, 26 Sep 2009 17:23:17 -0300
> From: Germ?n Racca <german.racca(a)gmail.com>
> Subject: Re: I can't connect via ssh
> To: "Community assistance, encouragement, and advice for using
> Fedora." <fedora-list(a)redhat.com>
> Message-ID: <1253996597.1845.16.camel(a)centauri.das.inpe.br>
> Content-Type: text/plain; charset="UTF-8"
>
> On Sat, 2009-09-26 at 15:30 -0400, Erik Hemdal wrote:
>>
>> > From: Germ?n Racca <german.racca(a)gmail.com>
>> > Subject: Re: I can't connect via ssh
>> > To: "Community assistance, encouragement, and advice for using
>> > Fedora." <fedora-list(a)redhat.com>
>> > Message-ID: <1253925734.7784.27.camel(a)centauri.das.inpe.br>
>> > Content-Type: text/plain; charset="UTF-8"
> Hi Erik,
>
> Thanks for your clarifying message! Now I discovered the following:
>
> I can ping and connect via ssh from other computer to my notebook, but
> *I can't from other computer to my PC*. The messages, from other
> computer to my PC are:
>
> $ ssh xx.xx.xx.xx
> ssh: connect to host xx.xx.xx.xx port 22: No route to host
>
OK, so what can we learn from this?
Your notebook has a working configuration of the SSH server and it can be
found on the network.
Your "other computer" probably has a good configuration of the SSH client.
If you end up with SSH troubles, knowing which systems have known-good
setups can be very important. But from what you've told me, I don't yet
suspect SSH is the problem, there's something else. You aren't even
reaching SSH on the computer you want to get to.
> $ ping xx.xx.xx.xx
>>From xx.xx.xx.xx icmp_seq=11 Destination Host Unreachable
So if I understand things, there are three computers here: The "PC", which
is the computer you're trying to access, let's call that "Alpha", another
computer, let's call it "Baker", and your notebook, let's call it "Charlie".
Baker can "ssh into" Charlie. But neither Baker nor Charlie can ssh into
Alpha. And Alpha is the one you really need to reach. Further,you can't
even ping Alpha, you get the "no route to host" errors. Since you get them
from two different computers, Baker and Charlie, I'm more suspicious that
something on Alpha is the problem, or something on the network (the common
link) is wrong.
If I were there, I would check a few things. I'd log on to Alpha and see
what I can do FROM that computer. Can you browse the Web, ping other
computers, and so forth? That might tell us a lot. For example, if the
network cable on that computer is loose or broken, you'd see these problems.
Then, I'd try to look at the equipment itself: What is the computer
connected to on the network? For example, it might go into a network box
right there in the room, or it might just go into the wall. If the first
case is true, then you can check the network connections that are there. If
the network cable goes into the wall, you probably need to talk to the
network admins for help. When other posters were asking about your physical
setup, this is what they were asking about.
If you can reboot Alpha, or at least restart its network service, you might
cure the problem too. But you need to know if Alpha is working right first;
don't just turn it off if you don't have to.
Erik
>
> I'm going to contact the network administrator on Monday, but I hope
> that you and the other guys that answered to my post can continue to
> help me on this issue. Sorry for my bad English ;-)
>
> Germán.
> --
> Germán A. Racca
> National Institute for Space Research (INPE)
> São José dos Campos - SP - Brasil
> http://gracca.wordpress.com
> http://tinyurl.com/SkyTux
>
> .
14 years, 7 months
latest selinux policy update errors
by Mark Haney
Is anyone else seeing these types of failures with the latest selinux
updates?
libsemanage.semanage_direct_remove: Module dpkg was not found.
semodule: Failed on dpkg!
error: %trigger(selinux-policy-strict-2.6.4-21.fc7.noarch) scriptlet
failed, exit status 1
libsemanage.semanage_direct_remove: Module dpkg was not found.
semodule: Failed on dpkg!
error: %trigger(selinux-policy-strict-2.6.4-23.fc7.noarch) scriptlet
failed, exit status 1
Should I file a bug report?
--
Da mihi sis bubulae frustrum assae, solana tuberosa in modo gallico
fricta, ac quassum lactatum coagulatum crassum
Mark Haney
Sr. Systems Administrator
ERC Broadband
(828) 350-2415
Call (866) ERC-7110 for after hours support
14 years, 7 months
Fedora IRC Classoom session coming up (2009-09-29 at 1:00 UTC)
by Kevin Fenzi
Greetings.
This is a regular posting every monday,
letting people know about the upcoming IRC classroom sessions that are
scheduled.
From the Classroom page at:
https://fedoraproject.org/wiki/Classroom
we currently have the following Classes scheduled:
2009-09-29 01:00 UTC Upcoming Fedora 12 Features overview -- Kevin Fenzi
Note that this is tonight in the evening in North America.
(Use 'date -u' to see your current time and date in UTC).
We have several other classes in planning stages now, hopefully to be
announced soon.
Please see the above page for more information on signing up to teach a
class, providing feedback to the classroom mailing list or other
general information.
Hope to see lots of folks there!
kevin
14 years, 7 months