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 ...
随机推荐
- Button、ImageButton及ImageView详解
Button.ImageButton及ImageView详解 在应用程序开发过程中,很多时候需要将View的background或者src属性设置为图片,即美观又支持点击等操作.常见的有Button. ...
- 【bzoj1601】[Usaco2008 Oct]灌水(MST)
题目:http://hzwer.com/1158.html 分析: 解法很巧妙,弄一个超级源,对某个点装水井相当于把这个点连向超级源,边权为这个点的点权,然后跑最小生成树就行了
- sockaddr与sockaddr_in结构体简介
struct sockaddr { unsigned short sa_family; /* address family, AF_xxx */char sa_data[14]; ...
- 从scrapy使用经历说开来
关于scrapy这个Python框架,萌萌的官网这么介绍: An open source and collaborative framework for extracting the data you ...
- iOS开发中的错误整理,Changing the delegate of a tab bar managed by a tab bar controller is not allowed
iOS [错误:'Changing the delegate of a tab bar managed by a tab bar controller is not allowed.'] 错误:'Ch ...
- 【BZOJ 1503】【NOI 2004】郁闷的出纳员
$Splay$模板题. 复习一下伸展树的模板. 一定不要忘了push啊!!! 对于减工资后删掉员工的操作,我选择插入一个$min+delta_{减少的工资}$的节点,把它$Splay$到根,砍掉它自己 ...
- Mybatis + SpringMVC + Maven实现分页查询
使用Mybatis + Maven + SpringMVC 运行时,突然被需要分页查询的功能给难住了 这里推荐采用的插件是PageHelper这个插件,使用起来十分方便.该插件支持以下数据库: Ora ...
- TODO: 图片加载框架ImageLoader的实现
1, 使用三级缓存策略 2, 使用builder模式设置ImagLoager的config
- 【BZOJ-4127】Abs 树链剖分 + 线段树 (有趣的姿势)
4127: Abs Time Limit: 40 Sec Memory Limit: 256 MBSubmit: 381 Solved: 132[Submit][Status][Discuss] ...
- 【bzoj1433】 ZJOI2009—假期的宿舍
http://www.lydsy.com/JudgeOnline/problem.php?id=1433 (题目链接) 题意 一个暑假,有人去大学里面探望朋友,有些人回家了,有些人留下了,每个人都要在 ...