实践awk,sed 正则表达式应用。

OpenBSD的安装、升级、更新等日常问题。

版主: chenjun天地乾坤

回复
wkx9dragon
锌 Zn
帖子: 493
注册时间: 2010-02-02 18:00

实践awk,sed 正则表达式应用。

帖子 wkx9dragon » 2010-04-11 22:16

由于BSD不能3G上网,也没有备份,所以只能在winxp下下载。问网友要了个软件依赖记录。
记录如下。
atk-1.24.0 accessibility toolkit used by gtk+
bash-4.0.24 GNU Bourne Again Shell
bzip2-1.0.5 block-sorting file compressor, unencumbered
cairo-1.8.8 vector graphics library
cdparanoia-3.a9.8p0 CDDA reading utility with extra data verification features
desktop-file-utils-0.15 utilities for 'desktop' entries
esound-0.2.41v0 sound library for Enlightenment
faad-2.6.1 MPEG-2 and MPEG-4 AAC decoder
feh-1.3.4 lightweight image viewer
firefox35-3.5 redesign of Mozilla's browser component
gettext-0.17p0 GNU gettext
giblib-1.2.4p3 utility library including a imlib2 wrapper
glib2-2.18.4p3 general-purpose utility library
glitz-0.5.6p1 OpenGL image compositing library
gtk+2-2.14.7p0 multi-platform graphical toolkit
hicolor-icon-theme-0.10p4 high-color icon theme shell for GNOME and KDE
imlib2-1.4.2 image manipulation library
jasper-1.900.1p0 reference implementation of JPEG-2000
jpeg-6bp5 IJG's JPEG compression utilities
lame-3.98.2 lame ain't an MP3 encoder
libaudiofile-0.2.6p2 SGI audiofile library clone
libdv-0.104p4 Quasar DV codec
libiconv-1.13 character set conversion library
libid3tag-0.15.1bp2 library for reading ID3 tags
libmpcdec-1.2.6 musepack decoder library
libogg-1.1.3 Ogg bitstream library
libtheora-1.0 open video codec
libungif-4.1.4p1 tools and library routines for working with GIF images
libxml-2.6.32p2 XML parsing library
mlterm-2.9.0p8 color terminal emulator with unicode support
mplayer-1.0rc2p24 movie player supporting MPEG, DivX, AVI, ASF, MOV & more
mrxvt-0.5.4p0 multi-tabbed terminal emulator
openbox-3.4.7.2p3 small, fast & usable window manager
pango-1.22.4p0 library for layout and rendering of text
pcre-7.9 perl-compatible regular expression library
png-1.2.35 library for manipulating PNG images
popt-1.7p0 getopt(3)-like library with a number of enhancements
py-xdg-0.16p1 python library to access freedesktop.org standards
python-2.5.4p1 interpreted object-oriented programming language
scim-1.4.7p0 smart common input method platform
scim-pinyin-0.5.91p0 scim input method module for pinyin
speex-1.2rc1 patent-free speech codec
sqlite3-3.6.13p0 embedded SQL implementation
startup-notification-0.9 library for tracking application startup
tiff-3.8.2p4 tools and library routines for working with TIFF images
x264-20090204 free H264/AVC encoder
xvidcore-1.2.2 ISO MPEG-4 compliant video codec
zsh-4.3.10 Z shell, Bourne shell-compatible

-、
下载unix命令工具。gnuwin32 包在 (gnuwin32.sourceforge.net/) 解压后就能使用了。

二、
cd D:\BACKUP\SYSTEM\UNIX\BSD\OpenBSD\packages

三、
gawk "{ print $1 }" e.log | sed -e "s/\-.*//" -e "s/^/wget -c ftp\:\/\/ftp\.openbsd\.org\/pub\/OpenBSD\/4\.6\/packages\/amd64\//g" -e "s/$/*/g" >a.bat

四、
a.bat

后记:
正则表达式中没找到 简单表示带有原字符的字符串,比如用“ftp://ftp.openbsd.org/pub/OpenBSD/4.6/packages/amd64/" 表示 ftp\:\/\/ftp\.openbsd\.org\/pub\/OpenBSD\/4\.6\/packages\/amd64\/ 的方法。

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 2 访客