Article View: es.comp.os.linux.programacion
Article #11125Re: Actualizar el XF86Config desde un script
From: Juan Pedro Vallejo
Date: Sat, 29 Dec 2001 23:39
Date: Sat, 29 Dec 2001 23:39
31 lines
1582 bytes
1582 bytes
On Fri, 28 Dec 2001 20:42:51 +0100, tas <tas@subdimension.com> wrote:
> Hola. Estoy intentando actualizar la entrada "FontPath" del fichero
;---------------------------------------
#!/bin/awk -f
BEGIN {
if (ARGC != 2)
exit 1
new_path = "/usr/X11R6/lib/X11/fonts/Mozilla:unscaled"
}
tolower($1) == "fontpath", /"$/ {
if ($0 ~ new_path) {
last_record = 0
exit
} else
last_record = NR
}
END {
if (last_record > 0)
printf("%ds#\"$#,%s\"#\nwq\n", last_record, new_path)
| "ed -s \"" ARGV[1] "\""
}
;---------------------------------------
Ejec�talo como "script fichero". No est� muy probado, aviso.
Juan Pedro.
Technical Details
Message-ID:
<buks2u4jp1sd25e1drjhb54imi57fng9ne@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!small.news.tele.dk!134.222.94.5!npeer.kpnqwest.net!news.airtel.netReferences:
<rvhi0a.9aj.ln@127.0.0.1>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f86c8,3ab78fa791df1f1e X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2001-12-29 15:41:06 PST From: Juan Pedro Vallejo <jpdr@navegalia.com> Newsgroups: es.comp.os.linux.programacion Subject: Re: Actualizar el XF86Config desde un script Date: Sun, 30 Dec 2001 00:39:52 +0100 Message-ID: <buks2u4jp1sd25e1drjhb54imi57fng9ne@4ax.com> References: <rvhi0a.9aj.ln@127.0.0.1> X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 212.73.55.225 X-Original-NNTP-Posting-Host: 212.73.55.225 X-Trace: news.airtel.net 1009669238 212.73.55.225 (30 Dec 2001 00:40:38 +0100) Lines: 31 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!small.news.tele.dk!134.222.94.5!npeer.kpnqwest.net!news.airtel.net