摘要:
""" Lists are used to store multiple items in a single variable. Lists are one of 4 built-in data types in Python used to store collections of data, t 阅读全文
摘要:
""" Boolean represent two values 'True' or 'False'. """ if name == 'main': # When you run a condition in an if statement, Python returns True or False 阅读全文
摘要:
import os if name == 'main': ''' Python I/O Python has serveral functions for createing,reading,updating,and deleting files. functions:open,read,write 阅读全文
摘要:
Typeset Use case 1.无选项的执行typeset,则显示所有变量。 2.typeset -u 将字符变量转换成大写。 3.typeset -l 将字符变量转换成小写。 4.typeset -Ln 左对齐截取n个字符。 5.typeset -Rn 又对齐截取n个字符。 6.typese 阅读全文
摘要:
Python Data Type | Data typeype: | examples | | | | | Text Type: | str | | Numeric Types: | int, float, complex | | Sequence Types: | list, tuple, ran 阅读全文
摘要:
Shell 基础 Shebang - Unix系统中,会将Shebang(#!)后面的内容作为解释器指令。 - #!/bin/sh 指的就是bash 解释器。 注意事项: 1.如果脚本未制定Shebang, 脚本执行是会默认当前shell解释器去解释脚本, 即$SHELL. 2.如果Shebang指 阅读全文
摘要:
Shll 脚本中的$常见用法: $0:Shell 的命令本身 $(1-9):表示 Shell 的第几个参数 $? :显示最后命令的执行情况 $#:传递到脚本的参数个数 $$:脚本运行的当前进程 ID 号 $*:以一个单字符串显示所有向脚本传递的参数 $@ 以单个参数的形式向脚本传递所有参数 $!:后 阅读全文