IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

cut命令

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

cut命令

cut命令用来显示行中的指定部分,其从文件的每一行剪切字节、字符和字段并将这些字节、字符和字段写至标准输出,如果不指定File参数,cut命令将读取标准输入,该命令常用的两项功能,一是用来显示文件的内容,它依次读取由参数file所指明的文件,将它们的内容输出到标准输出上,其二是连接两个或多个文件,如cut f1 f2 > f3将把文件f1和几的内容合并起来,然后通过输出重定向符>的作用,将它们放入文件f3中,当文件较大时,文本在屏幕上迅速闪过,也就是滚屏现象,为了控制滚屏,可以执行Ctrl+S按键停止滚屏,按Ctrl+Q键可以恢复滚屏,按Ctrl+C键终止该命令的执行等操作。

语法

cut [OPTION]... [FILE]...

参数

  • -b: 仅显示行中指定直接范围的内容。
  • -c: 仅显示行中指定范围的字符。
  • -d: 指定字段的分隔符,默认的字段分隔符为TAB
  • -f: 显示指定字段的内容。
  • -n: 与-b选项连用,不分割多字节字符。
  • --complement: 补足被选择的字节、字符或字段。
  • --out-delimiter=<delimiter>: 指定输出内容是的字段分割符。
  • --help: 显示指令的帮助信息。
  • --version: 显示指令的版本信息。

示例

截取/tmp/file.txt文件每一行的第3个字符。

cat /tmp/file.txt | cut -c 3
# 3
# 4
# 5
# 6
# 7
# 8
# 9
# 0
# 1
# 2

截取/tmp/file.txt文件每一行的第3-6个字符。

cat /tmp/file.txt | cut -c 3-6
# 3456
# 4567
# 5678
# 6789
# 7890
# 8901
# 9012
# 0123
# 1234
# 2345

截取/tmp/file.txt文件每一行的第3个字符到结尾字符。

cat /tmp/file.txt | cut -c 3-
# 34567890
# 45678901
# 56789012
# 67890123
# 78901234
# 89012345
# 90123456
# 01234567
# 12345678
# 23456789

每日一题

https://github.com/WindrunnerMax/EveryDay

参考

https://man.linuxde.net/cut
https://www.runoob.com/linux/linux-comm-cut.html
https://www.tutorialspoint.com/unix_commands/cut.htm

文章永久链接:https://tech.souyunku.com/?p=39803


Warning: A non-numeric value encountered in /data/wangzhan/tech.souyunku.com.wp/wp-content/themes/dux/functions-theme.php on line 1154
赞(79) 打赏



未经允许不得转载:搜云库技术团队 » cut命令

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码
IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

评论 抢沙发

大前端WP主题 更专业 更方便

联系我们联系我们

觉得文章有用就打赏一下文章作者

微信扫一扫打赏

微信扫一扫打赏


Fatal error: Uncaught Exception: Cache directory not writable. Comet Cache needs this directory please: `/data/wangzhan/tech.souyunku.com.wp/wp-content/cache/comet-cache/cache/https/tech-souyunku-com/index.q`. Set permissions to `755` or higher; `777` might be needed in some cases. in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php:367 Stack trace: #0 [internal function]: WebSharks\CometCache\Classes\AdvancedCache->outputBufferCallbackHandler() #1 /data/wangzhan/tech.souyunku.com.wp/wp-includes/functions.php(5109): ob_end_flush() #2 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(303): wp_ob_end_flush_all() #3 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #4 /data/wangzhan/tech.souyunku.com.wp/wp-includes/plugin.php(470): WP_Hook->do_action() #5 /data/wangzhan/tech.souyunku.com.wp/wp-includes/load.php(1097): do_action() #6 [internal function]: shutdown_action_hook() #7 {main} thrown in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php on line 367