文章分类 - Scripts
摘要:1 数组 arr_string=("sadf" "adsf"); arr_string_len=${#arr_string[@]} echo ${arr_string[1]} 2 echo 0x00000 到二进制文件 echo 0x88888888 | xxd -r -ps > file 如何换字
阅读全文
摘要:a.bin Split a.bin to c.bin d.bin at 32 bytes postion. dd if=a.bin of=c.bin ibs=32 count=1 Now, we got c.bin dd if=a.bin of=d.bin ibs=32 skip=1 Now, we
阅读全文
摘要:#!/bin/sh foreachd () { echo $1 for file in $1/* do if [ -d $file ] then echo "directory $file" foreachd $file fi if [ -f $file ] then echo "file $file" dos2unix $file chmod -x $file fi done } ech...
阅读全文
摘要:Shell: align.sh (未测试) 注意运算符两边要有空格。 #!/bin/bashfile_size=`ls -l $2 | awk '{print $ 5}'`align_size=`expr $file_size + $1 - 1`block_num=`expr $align_size
阅读全文
摘要:@echo off echo 正在清除系统垃圾文件,请稍等...... del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %s
阅读全文
摘要:1 删除每行前N个字符,经常从网上拷贝代码,但是都带行号的,用这个不错。 2 sed 比对每一行数据,如附和样式,执行指定操作。删除D 3 替换S/打印P (取用附和样式的字符串) 4 awk的工作方式是:读取数据文件,将每一行数据实为一条记录。每笔记录以字段分隔符分成若干段。 5 打印ifconf
阅读全文

浙公网安备 33010602011771号