# ShellScripts **Repository Path**: QMHTMY/ShellScripts ## Basic Information - **Project Name**: ShellScripts - **Description**: 一些有用的shell脚本 - **Primary Language**: Shell - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-06-20 - **Last Updated**: 2021-05-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README = 实用Shell脚本 Shieber ifndef::env-github[:icons: font] ifdef::env-github[] :outfilesuffix: .adoc :caution-caption: :fire: :important-caption: :exclamation: :note-caption: :paperclip: :tip-caption: :bulb: :warning-caption: :warning: endif::[] :uri-license: https://github.com/QMHTMY/ShellScripts/blob/master/LICENSE :uri-readme-cn: https://github.com/QMHTMY/ShellScripts/blob/master/README_CN.adoc == 描述 [link:README.adoc[English]] 一些有用的命令行 Shell 脚本。 == 兼容系统 * Linux * Mac OS == 依赖 * eog * axel * atril * lynx * ffmpeg * mencoder * opencc * pandoc * you-get * argparse * matplotlib * numpy * texlive == 安装 .Installation ---- aog sudo apt install eog axel sudo apt install axel atril sudo apt install atril lynx sudo apt install lynx ffmpeg sudo apt install ffmpeg mencoder sudo apt install mencoder opencc sudo apt install opencc pandoc sudo apt install pandoc you-get sudo pip3 insatll you-get argparse sudo pip3 insatll argparse matplotlib sudo pip3 insatll matplotlib numpy sudo pip3 insatll numpy texLive 参见 http://tug.org/texlive/ #安装复杂,费时,但是安好用起也舒服。 或见 https://blog.csdn.net/Shieber/article/details/93716448 ,我已把所有安装步骤写好。 ---- == 脚本功能 . Battery - 查看电池信息 . Convert2mp4 - 用ffmpeg将flv/avi/mkv/mpeg/rmvb格式视频转换为mp4 . Convert2pdf - 用pandoc将txt/html/docx/markdown/restructuredText文档转换为pdf . Cpuhigh - 显示最占用时间的10个进程 . Daysdiff - 计算输入日期和今日之间相隔天数,或输入两个日期,计算其相隔天数 . Eog - 从命令行打开图片(avif/png/jpg/jpeg/gif),同时避免出现错误信息 . Flash - 刷新交换分区 . Getgitraw - 通过url从命令行下载github某账户仓库中的单个文件 . Html2txt - 从html中提取文件内容为txt格式 . Killcmd - 输入命令名称(不用输完整的,只要确保惟一)以杀死进程 . Memhigh - 显示最占用内存的10个进程 . OpenHttpSrv - 利用python开启一个Http server,用于在局域网内分享文件 . Pdf - 从命令行打开pdf文件,同时避免出现错误信息 . Pidinfo - 输入PID以获取进程信息 . Rm - /bin/rm的别称,该命令不删除而是将文件移动到/home/usrname/Trash中,防止误删 . Simple2t - 转换简体中文为繁体中文 . Trademarks - 转换繁体中文为简体中文 . SystemInfo - 获取系统信息 . SysFileSize - 统计系统某路径下所有文件的大小情况 . Video2radio - 提取视频中的音频 . Videocombine - 合并两个mp4视频为一个 . Wechat - 用firefox打开网页版微信,可替换成chrome . YougetVideo - 用you-get从url或url文件下载音/视频/图片 == 用法 (最好将这些命令加入/usr/local/bin/), | 分隔各种用法 . Battery - `Battery` . Convert2mp4 - `Convert2mp4 video.flv` . Convert2pdf - `Convert2pdf file.txt/file.md/file.rst/file.docx` . Daysdiff - `Daysdiff 2020-06-30 | Daysdiff 2020-06-30 2020-08-21` . Eog - `Eog picture.png` . Flash - `Flash` . Getgitraw - `Getgitraw https://github.com/user/repository/filename` . Html2txt - `Html2txt file.html | Html2txt` . Killcmd - `Killcmd xelatex` . OpenHttpSrv - `OpenHttpSrv` . Pdf - `Pdf xxx-file.pdf` . Pidinfo - `Pidinfo 6789` . Rm - `Rm file` . Simple2t - `Simple2t 丰收 |Simple2t simple.txt |Simple2t simple.txt traditional.txt` . Tradition2s - `Tradition2s 丰收 |Tradition2s tradition.txt |Tradition2s tradition.txt simple.txt` . SystemInfo - `SystemInfo` . SysFileSize - `SysFileSize sysfile.txt` . Video2radio - `Video2radio video.mp4` . Videocombine - `Videocombine 1.mp4 2.mp4 together.mp4` . Wechat - `Wechat` . YougetVideo - `YougetVideo https://www.youtube.com/xxx | video.url` #可用url或把url写入video.url == 更新日志 * 2021.05.07 Eog 支持打开 https://zhuanlan.zhihu.com/p/355256489[AVIF] 图像格式 * 2020.07.09 首次更新 == 参考资料 * https://ffmpeg.org[ffmpeg] * https://pandoc.org[pandoc] * http://tug.org/texlive[texlive] * https://github.com/soimort/you-get[you-get] * https://samizdat.dev/help-message-for-shell-scripts[script help message] * https://farseerfc.me/file-size-histogram.html[系統中的大多數文件有多大] == 版权声明 Copyright (C) 2019-2021 Shieber,在 link:LICENSE[APACHE LICENSE] 下开源。