开发者社区 问答 正文

shell脚本报错:no input files ?报错

本人小白,写了个简单的shell脚本:
#!/bin/sh
#this is a script that can replace character "|" to "\n"
#name: cc
#to call:cc < filename
tr '|' '\n' | cat -n

但是一执行就报错 cc:no input files
求解惑

展开
收起
爱吃鱼的程序员 2020-06-24 14:07:45 600 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    你调用bash脚本的时候,有<filename
    填导入文件参数吗

    2020-06-24 14:08:00
    赞同 展开评论
问答分类:
问答地址: