我看过这篇文章:sed delete remaining characters in line except first 5它帮助我删除x后的所有字符。但是,我很难找到如何删除x字符后的所有单词。 我开始使用此代码: echo "StackOverflow Users Are Brilliant And Hard Working" | sed 's/.//30g'
#character 30 -
你好,我正在尝试使脚本从文件中搜索特定的信息并将其打印出来。我的情况是这样的:我有一个格式为:id|lastname|firstname|birthday|的文件。我想调用剧本并给出一个日期参数和文件,让它显示我给出日期后出生的所有“人物”。 让我告诉你我的代码: #!/bin/bash
case $1 in
--born-since)
d=($2 +%F); # this one puts