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

#! /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. flask项目结构(五)使用数据库

    简介: 基础搭建好了,开始读写数据库吧.毕竟写的程序,也没什么高深的,就是CRUD,中文说是增删改查. 一:在数据库中增加测试数据. 在项目根目录建立init_test.py from config ...

  2. 堆排序,图解,C/C++实现

    body, table{font-family: 微软雅黑; font-size: 13.5pt} table{border-collapse: collapse; border: solid gra ...

  3. vue-6-事件处理

    <div id="example-2"> <button v-on:click="greet">Greet</button> ...

  4. 【转载四】Grafana系列教程–Grafana基本概念

    在上面几篇文章中,我们介绍了Grafana的安装配置以及运行的方法,本篇文章我们就来介绍下Grafana的基本概念. 有问题欢迎加群讨论,InfluxDB&Grafana技术交流群:58048 ...

  5. [Leetcode 62]机器人走路Unique Path 动态规划

    [题目] A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below) ...

  6. hdu5335(bfs,贪心)

    In an n∗mn∗m maze, the right-bottom corner is the exit (position (n,m)(n,m) is the exit). In every p ...

  7. PCP架构设计

    1.引言 现如今已经进入互联网时代,无论是工作还好娱乐都已经离不开互联网,与此同时,网络相关的问题也时不时的侵扰着我们,这需要我们具有一定网络相关知识来解决相关问题,而这时,一款工作便利,免费的网络分 ...

  8. Oracle 用户 表 表空间之间的关系和管理

    文献地址: https://blog.csdn.net/jmilk/article/details/51599260 https://www.cnblogs.com/roger112/p/768530 ...

  9. ios中xib文件的用法

    ZQRView文件: // // ZQRView.h // // // Created by zzqqrr on 17/8/20. // // #import <UIKit/UIKit.h> ...

  10. SpringBoot(2.0.4.RELEASE)+Elasticsearch(6.2.4)+Gradle简单整合

    记录一下SpringBoot(2.0.4.RELEASE)+Elasticsearch(6.2.4)+Gradle整合的一个小例子. 1.在Gradle内加入相关jar包的依赖: compile('o ...