Git Product home page Git Product logo

wattman's Introduction

this is the wattman's interview question

要求:

  1. 写一个linux shell脚本统计指定目录下文件名满足' _gt.json'要求的文件数量,需要注意的是指定目录下的文件夹层数可能不一定。
  2. 将完成后的代码上传到github中(可以上传到其它git仓库)。

执行脚本+ 指定目录+关键词
例如 在linux 终端命令行执行:python3 /home/hongzhi/PycharmProjects/pythonProject/main.py /mnt/hgfs/ubuntushare _gt.json

其中 home/hongzhi/PycharmProjects/pythonProject/main.py 是脚本main.py文件的目录路径
其中 /mnt/hgfs/ubuntushare 是指定目录
其中 _gt.json 是搜索匹配的关键字

最终linux终端打印效果:
/mnt/hgfs/ubuntushare/123/123_gt.json
/mnt/hgfs/ubuntushare/123/321/456_gt.json
/mnt/hgfs/ubuntushare/_gt.json
搜索出来的文件数量为: 3

wattman's People

Contributors

chzbuaa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.