exit
退出ipython
进入homework_9文件夹
ipython3 # 打python3交互环境
res = 2**112 + 3**78
! echo $res > ans.txt # ! 表示后面的内容是shell脚本
exit
退出ipython进入homework_9文件夹
ipython3 # 打python3交互环境
res = 2**112 + 3**78
! echo $res > ans.txt # ! 表示后面的内容是shell脚本
cd ~/homework/lesson_7/homework_8
tar -zcvf project_a.tar.gz dir_a
tar -zxvf project_b.tar.gz
cd ~/homework/lesson_7/homework_7
# 用 cut 把文件中空格后的部分去掉
md5sum scores.txt | cut -d ' ' -f 1 > ans.txt
cd ~/homework/lesson_7/hoemwork_6
head -5 scores.txt > top.txt
tail -4 scores.txt > bottom.txt
cd ~/homework/lesson_7/homework_4
cat scores.txt | cut -d ' ' -f 1 > names.txt
cat scores.txt | cut -d ' ' -f 2 > mathematics.txt
cat scores.txt | cut -d ' ' -f 3 > algorithm.txt
ag
和grep
的区别是,ag
不会区分大小写cd ~/homework/lesson_7/homework_2
find . -name '*.cpp' | xargs cat | wc -l > ans1.txt
find . -name '*.py' | xargs cat | grep thrift | wc -l > ans2.txt
chmod +r * -R
find . -name '*.cpp' | wc -l > ans.txt
1.cd homework_0
2.vim mydu
3.代码
#! /bin/bash
du -h
4.chomod +x mydu
5.vim ~/bashrc
6.在最后一行添加
export PATH=/home/acs/homework/lesson_7/homework_0
7.source ~/.bashrc