Shell Scripting

Shell Scripting

L1. Introduction to Shell

C1: manipulating files and directories

pwd: where am I?

在这里插入图片描述

ls: how can I identify files and directories?

在这里插入图片描述

How else can I identify files and directories?

在这里插入图片描述

cd: how can I move to another directory?

在这里插入图片描述

How can I move up a directory?

在这里插入图片描述

cp: how can I copy files?

在这里插入图片描述

mv: how can I move a file?

在这里插入图片描述

mv: how can I rename files?

在这里插入图片描述

rm: how can I delete files?

在这里插入图片描述

rmdir: how can I create and delete directories?

在这里插入图片描述

C2: manipulating data

cat: how can I view a file’s contents?

在这里插入图片描述

less: how can I view a file’s contents piece by piece?

在这里插入图片描述

head: how can I look at the start of a file?

在这里插入图片描述

tab completion: how can I type less?

在这里插入图片描述

command-line flag: how can I control what commands do?

在这里插入图片描述

-R: how can I list everything below a directory?

在这里插入图片描述
To help you know what is what, ls has another flag -F that prints a / after the name of every directory and a * after the name of every runnable program.

man: how can I get help for a command?

在这里插入图片描述
在这里插入图片描述

cut: how can I select columns from a file?

在这里插入图片描述

What can’t cut do?

在这里插入图片描述

history: how can I repeat commands?

在这里插入图片描述

grep: how can I select lines containing specific values?

在这里插入图片描述

paste: why isn’t it always safe to treat data as text?

在这里插入图片描述

C3: combining tools

>: how can I store a command’s output in a file?

在这里插入图片描述

How can I use a command’s output as an input?

在这里插入图片描述

What’s a better way to combine commands?

在这里插入图片描述

How can I combine many commands?

在这里插入图片描述

wc: How can I count the records in a file?

在这里插入图片描述

*: how can I specify many files at once?

在这里插入图片描述

What other wildcards can I use?

在这里插入图片描述

sort: how can I sort lines of text?

在这里插入图片描述

uniq: how can I remove duplicate lines?

在这里插入图片描述

How can I save the output of a pipe?

在这里插入图片描述

Ctrl+C: how can I stop a running program?

在这里插入图片描述

C4: batch processing

How does the shell store information?

在这里插入图片描述
Answer: 2000

echo: how can I print a variable’s value?

在这里插入图片描述

shell variable: how else does the shell store information?

在这里插入图片描述

loop: how can I repeat a command many times?

在这里插入图片描述

How can I repeat a command once for each file?

在这里插入图片描述

How can I record the names of a set of files?

在这里插入图片描述

A variable’s name versus its value

在这里插入图片描述

How can I run many commands in a single loop?

在这里插入图片描述

Why shouldn’t I use spaces in filenames?

在这里插入图片描述

How can I do many things in a single loop?

在这里插入图片描述

C5: creating new tools

nano: how can I edit a file?

在这里插入图片描述

history: how can I record what I just did?

在这里插入图片描述

How can I save commands to re-run later?

在这里插入图片描述

bash script: how can I re-use pipes?

在这里插入图片描述

$@: how can I pass filenames to scripts?

在这里插入图片描述

$1, $2, … : how can I process a single argument?

在这里插入图片描述

How can one shell script do many things?

在这里插入图片描述

How can I write loops in a shell script?

在这里插入图片描述

What happens when I don’t provide filenames?

在这里插入图片描述

L2. Conda Essentials

C1. Installing Packages

What are packages and why are they needed?

在这里插入图片描述

What version of conda do I have?

在这里插入图片描述

Install a conda package (I)

在这里插入图片描述

Install a conda package (II)

在这里插入图片描述
在这里插入图片描述

What is semantic versioning?

在这里插入图片描述

Which package version is installed?

在这里插入图片描述

Install a specific version of a package (I)

在这里插入图片描述

Install a specific version of a package (II)

在这里插入图片描述

Update a conda package

在这里插入图片描述

Remove a conda package

在这里插入图片描述

Search for available package versions?

在这里插入图片描述

Find dependencies for a package version?

在这里插入图片描述
在这里插入图片描述

C2. Utilizing Channels

Channels and why are they needed?

在这里插入图片描述

Searching within channels

在这里插入图片描述
在这里插入图片描述

Searching across channels

在这里插入图片描述

Default, non-default, and special channels

在这里插入图片描述

Installing from a channel

在这里插入图片描述

C3. Working with Environments

Environments and why are they needed?

在这里插入图片描述

Which environment am I using?

在这里插入图片描述
在这里插入图片描述

What packages are installed in an environment? (I)

在这里插入图片描述

What packages are installed in an environment? (II)

在这里插入图片描述

Switch between environments

在这里插入图片描述

Remove an environment

在这里插入图片描述

Create a new environment

在这里插入图片描述

Export an environment

在这里插入图片描述
在这里插入图片描述

Create an environment from a shared specification

在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值