我想重命名几个文件的格式
libabc-x86_64-gnu-linux.a
libasdfgh-x86-gnu-linux.a
全部按格式
libabc.a
libasdfgh.a
使用Bash。我已经编写了regex (libpj[^-]*).*,它应该将有趣的部分保留在捕获组1中。
for i in `ls *.a`; do mv "$i" "${i/(lib[^-]*).*/\1}"; done
但是Bash给出了许多形式上的错误
mv: 'libabc-x86_64-gnu-linux.a' and 'libabc-x86_64
我对unix和linux脚本比较陌生,有几个问题:
首先是我的剧本:
for fileref in Ref/*.bed; do
for filename in Data/*.bed; do
bedops -e 1 $fileref $filename > "${fileref}${filename}.out"
done
done
我希望以两个文件(这两个文件是从循环遍历每个目录中收集的)作为输入来执行-e命令,并将输出文件作为两个文件名的连接(最好在末尾没有.bed )。有什么好办法吗?
我一直在这里搜索,有一个非常类似的问题,在(如何在/中释放更多的空间?)
我遇到的问题是当我尝试解决这个问题的时候。例如: sudo apt-get purge linux-image-2.6.38-11
我得到:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linux-image-2.6.38-11-server' for regex 'linux-image-2.6.38-11'
You mi
我按照上的说明操作,但它不起作用。
$ pkg_info | grep linux_base
linux_base-f10-10_4 Base set of packages needed in Linux mode for i386/amd64 (L
$ kldstat | grep linux
5 1 0xffffffff8112d000 1c4ac linux.ko
$ ./wkhtmltoimage-amd64
ELF binary type "3" not known.
./wkhtmltoimage-amd64: Exec format error.
unaryOperators operator++ (const unaryOperators &one);
对于这个在类中声明的错误,我应该得到错误“太多的参数”等等,但是我得到的错误是:
error: postfix ‘unaryOperators unaryOperators::operator++(const unaryOperators&)’ must take ‘int’ as its argument
为什么必须以‘int’作为它的论点?什么意思?
GCC Linux