只保留代码中的头文件声明

#! /bin/sh  
echo "leave only INCluding declaration in c files"  
find $1 -name "*.c" -exec echo ">>> processing" {} \; -exec sed -i '  
#fetch lines without leading #include  
/^\s*#\s*include\s/b  
#b代表分支跳转,如果不代label,则代表跳转到脚本结尾(即直接返回)

/.*$/d  
#delete this lines

' {} \;

 
找出一个文件中所有的函数名
grep -E '^\w*([a-zA-Z0-9_]+ +)+([a-zA-Z0-9_]+) ?\(' lxFwd_Fwd.c 

bash scripts收集的更多相关文章

  1. centos 7安装mysql报错-bash: ./scripts/mysql_install_db: /usr/bin/perl: bad interpreter: No such file or directory

    [root@localhost mysql]# ./scripts/mysql_install_db  --user=mysql -bash: ./scripts/mysql_install_db: ...

  2. 使用ssh client与bash scripts轻松管理多台主机

    当我们需要控制一个局域网中的很多台服务器时,一个简单的全局操作可能会被放大地异常繁琐,这时我们就会需要新的工具来快速完成这种工作. 我们将使用ssh客户端提供的一些工具来快速完成这一开发工作,我们的开 ...

  3. 10 Useeful Tips for Writing Effective Bash Scripts in Linux

    1.Always Use Comments in Scripts2.Make a Scripts exit When Fails    Sometimes bash may continue to e ...

  4. Bash debug

    Debugging bash scripts Bash can help us to find problems in bash scripts in some ways. You don't exp ...

  5. Bash 的若干基本问题

    Bash 的若干基本问题   这里介绍一些bash启动前.后的问题,以及一些使用bash需要注意的基本问题.     1.Bash的介绍   Bash是一种Shell程序,它是一般的Linux系统中的 ...

  6. bash guide

    Table of Contents Basic Operations 1.1. File Operations 1.2. Text Operations 1.3. Directory Operatio ...

  7. 3、My Scripts

    .用for循环批量修改文件扩展名(P240) .使用专业改名命令rename来实现 .通过脚本实现sshd.rsyslog.crond.network.sysstat服务在开机时自动启动(P244) ...

  8. [NPM] Create a bash script to replace a complex npm script

    In this lesson we will look at pulling out complex npm scripts into their own external bash scripts. ...

  9. Bash on Ubuntu on Windows ( Windows Subsystem for Linux)

    1 #  Bash on ubuntu on Windows http://www.cnblogs.com/anonymous-ufo/p/6143480.html 1 1 如何启用Bash on u ...

随机推荐

  1. vue-4-Class 与 Style 绑定

    v-if <h1 v-if="ok">Yes</h1> 切换多个元素://最终的渲染结果不会包含 <template> 元素 <templ ...

  2. 双引号与尖括号的区别 and 相对路径与绝对路径

    包含头文件的时候,如果包含的是自己写的头文件是用" " .如果是包含系统的头文件,一般用<>. 相对路径与绝对路径

  3. css文件 如何使背景图片大小适应div的大小

    对背景图片设置属性:background-size:cover;可以实现背景图片适应div的大小. background-size有3个属性: auto:当使用该属性的时候,背景图片将保持100% 的 ...

  4. win 10 初始环境变量

    有时用户会修改Win10系统的环境变量,改到后面原来是什么的也记不得了,想要改回去还要去别的电脑查看,这里转载下Win10 64位环境变量的默认初始值. 附:打开环境变量方法:电脑左下右键——系统—— ...

  5. ubantu安装python3虚拟环境

    Ubuntu安装python3虚拟环境 安装虚拟环境 步骤: 打开Linux终端(快捷键Ctrl+Alt+T),输入命令: sudo apt install python-virtualenv sud ...

  6. Android Activity之间的传值示例

    AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xm ...

  7. swift3.0 存取json数据到沙盒

    do { //将json保存到本地 let jsonData = try JSONSerialization.data(withJSONObject: dict, options: .prettyPr ...

  8. h5 手机端适配问题汇总

    1.uc手机浏览器竟然没有 sessionstorage 醉了 2.opera 浏览器  能识别 a标签中href的  javascript:; 为网址  ,  55555 3.safari 的弹框如 ...

  9. maven项目中的pom.xml

    需要配置的内容 1.配置头(自动生成) 2.maven项目的坐标(自动生成) <modelVersion>4.0.0</modelVersion> <groupId> ...

  10. vsftp管理脚本(CentOS6用)

    #!/bin/bash # ### BEGIN INIT INFO # Provides: vsftpd # Required-Start: $local_fs $network $named $re ...