Browse Source

10215501417's commit

master
李泽朋 1 year ago
parent
commit
7bd805043c
1 changed files with 0 additions and 27 deletions
  1. +0
    -27
      lab1/10215501417.sh

+ 0
- 27
lab1/10215501417.sh View File

@ -25,33 +25,6 @@ git init #初始化
git add . #添加文件夹下所有文件
git commit -m "lab1 first commit" #把添加的文件提交到远程版本库
git remote add origin https://gitea.shuishan.net.cn/10215501417/csapp.git #建立远程连接
git push -u origin master #上传代码#!/bin/bash
#生成50000行包含字母与数字的文件
#需要从urandom中读取字母与数字,共50000次循环,大概需要5-10min左右。
for((i = 0; i < 50000; i++))
do
head -c 50 /dev/urandom | tr -dc A-Za-z0-9 >> RandFile;
echo -e \ >> RandFile;
done
#按字母排序
sort RandFile | uniq;
#按数字排序
sort -n RandFile | uniq;
#重定向到SortedFile1
sort RandFile | uniq >> SortedFile1;
#重定向到SortedFile2
sort -n RandFile >> SortedFile2;
#统计RandFile中 ab 出现的次数
grep -o ab RandFile|wc -l;
#git push到码园
git init #初始化
git add . #添加文件夹下所有文件
git commit -m "lab1 first commit" #把添加的文件提交到远程版本库
git remote add origin https://gitea.shuishan.net.cn/10215501417/csapp.git #建立远程连接
git push -u origin master #上传代码
#fork工作流:

Loading…
Cancel
Save