⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fixnames.pl

📁 无线通信的主要编程软件,是无线通信工作人员的必备工具,关天相关教程我会在后续传上.
💻 PL
字号:
#!/usr/bin/perl -w# Script to fix files... the automounter makes it nigh impossible to# get canonical absolute pathnames, so we'll just strip out everything# up to $USERNAME.# Input lines of the format:# number\tpath:number# Output, same, except that the paths inside the home directory will# all be of the form ~/blah/blahuse Cwd 'realpath';$me = `whoami`;chomp($me);while(<>) {    chomp();    /^(\d+)\t([^:]*):(\d+)$/;    ($bb, $file, $line) = ($1, $2, $3);    if(/^\d+\t:-1/) {	print "$_\n";	next;    }    $path = realpath($file) || die "fixname.pl: realpath '$file' failed: $!\n";    $path =~ s|/.*$me/|~/|;  # replace "/blah/blah/blah/username" with "~/"    print "$bb\t$path:$line\n";}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -