懒得写makefile

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

汇编编译调用glibc
#!/bin/bash

echo "开始编译非系统调用$1..."
ld -dynamic-linker /lib/ld-linux.so.2 -o $1 -lc "$1.o"
echo "编译完成..."

删除生成的知行文件和.o
#!/bin/sh

trashdir=/home/freelh/.local/share/Trash/files/

echo "开始清除DIR: $1 下可执行文件..."
for file in `ls $1`
do
	if [ -d $file ]; then
            echo "$file is direction..."
            continue;
        fi
	if [ -x $file ]
	then
		echo "$file是可执行文件,清除完成..."
		mv $1/$file $trashdir
	fi
done

#for file in `ls *.o`
#do
#	echo "$file是中间文件,清除完成..."
#	rm -f $file
#done


gtk编译使用的代替编译命令
#!/bin/bash

echo "开始编译$1..."
gcc $1.c -o $1 `pkg-config --cflags --libs gtk+-2.0`

gtk编译目录下所有文件
#!/bin/bash

for i in `ls -l *.c |awk -F' ' '{print $9}'|awk -F. '{print $1}' `
do
	name=basename
	echo "开始编译$i..."
	gcc $i.c -o $i `pkg-config --cflags --libs gtk+-2.0`
done

gas编译代替命令
#!/bin/sh

echo "as -o $1.o $1.s"
echo "ld -o $1 $1.o"
as -o "$1.o" "$1.s"
ld -o $1 "$1.o"

远程ssh登录
#!/usr/bin/perl -w 
use Net::SSH::Perl;

$host = "192.168.2.3";
$user = "freelh";
$pass = "111111";

my $ssh = Net::SSH::Perl->new($host);
$ssh->login( $user, $pass );
my( $stdout, $stderr, $exit) = $ssh->cmd( $cmd );