shell text process code
shell 命令处理文本:
1. 批量处理该目录下的文件,ls | while read l ; do echo $l ; done > b.txt
2. 批量处理文件的每一行 , cut -f 1 a.txt | while read l ; do echo $l ; done > b.txt
3. 对文件内容进行匹配 , grep > ; sed 1d ; head b.txt ; cut -f 2 -d "|" ;
4. paste a.txt b.tx > c.txt
change permission:
sudo chown -R username:usergroup *
mv the file:
sudo rsync -avzrP username@192.168.1.221:workspace/web .
sudo rsync -avzrp '-e ssh -p 245' username@211.168.1.211:workspace/web .
-rwxrwxrwx (4,2,1)
shell text process code的更多相关文章
- adb shell input keyevent code详解
adb shell input keyevent 7 # for key '0' adb shell input keyevent 8 # for key '1' adb shell input ke ...
- 【HTML】Intermediate2:Text: AbbreviationsQuotations Code
1.</abbr> attribute:title 2.Quotations blockquote :standalone often multi-line quotations-cite ...
- shell 备份 source code
1. 利用shell脚本备份源码 首先mkdir创建三个目录 backup存放备份代码,script 存放shell脚本,www存放源码 2.创建文件 3. 编写shell脚本 #!bin/sh b ...
- ubuntu自动登录tty1(shell,text)配置
1.写脚本autologin 代码: #!/bin/bash/bin/login -f #你的用户名 移动到/usr/bin/下,并且用chmod +x autologin设置可执行权限 2.修改/e ...
- Code Generation and T4 Text Templates
Code Generation and T4 Text Templates Code Generation and T4 Text Templates
- 转:Process类的使用
转载自:http://www.oschina.net/code/snippet_119226_6188 一.根据进程名获取进程的用户名? 需要添加对 System.Management.dll 的引用 ...
- Visual Studio Code 配置 gcc
作者:谭九鼎链接:https://www.zhihu.com/question/30315894/answer/154979413来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注 ...
- java操作linux,调用shell命令
import org.junit.jupiter.api.Test; import java.io.BufferedReader; import java.io.IOException; import ...
- 爆路径写后门拿shell的一些姿势
[PhpMyAdmin后台拿Shell]CREATE TABLE `mysql`.`xiaoma` (`xiaoma1` TEXT NOT NULL );INSERT INTO `mysql`.`xi ...
随机推荐
- SQLite剖析之C/C++接口
前言 SQLite3是SQLite一个全新的版本,它虽然是在SQLite2的代码基础之上开发的,但是使用了和之前的版本不兼容的数据库格式和API.SQLite3是为了满足以下的需求而开发的:支持UTF ...
- hdu-1823 Luck and Love
题目链接:hdu1823二维线段树单点更新区间查询 题意 向一个100*1000的二维空间中插入点,每次查询时,查询区间最大值. 题解 身高既然是100~200,那就相当于100;活泼度相当于1000 ...
- redis的主从复制配置
redis的主从复制配置 一. 原理 Redis的主从复制功能非常强大,一个master可以拥有多个slave,而一个slave又可以拥有多个slave,如此下去,形成了强大的多级服务器集群架 ...
- 使用Servlet实现下载文件的功能
在前台有一个下载链接,比如 <a href="DownLoadServlet">下载</a> <br/> 使用Servlet实现下载: impo ...
- MySQL server PID file could not be found!
重启mysql提示MySQL server PID file could not be found! Starting MySQL...The server quit without updating ...
- Android 判断当前屏幕是横屏还是竖屏
记录学习 /** * 返回当前屏幕是否为竖屏. * @param context * @return 当且仅当当前屏幕为竖屏时返回true,否则返回false. */ public s ...
- 【COGS 254】【POI 2001】交通网络图
http://www.cogs.top/cogs/problem/problem.php?pid=254 dist[i]表示能最早到达i点的时间.这样就可以用最短路模型来转移了. #include&l ...
- hdu3555 数位dp
Bomb Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Total Subm ...
- 表单提交中get和post方式的区别
表单提交中get和post方式的区别有5点 1.get是从服务器上获取数据,post是向服务器传送数据. 2.get是把参数数据队列加到提交表单的ACTION属性所指的URL中,值和表单内各个字段一一 ...
- js学习笔记4----数据类型
1.ECMAScript:标准.核心 JS中的数据类型:数字(NaN).字符串(空隔也会占据长度).布尔值(true和false).函数.对象(obj.[].{}.null).undefined. t ...