面试总结之Linux/Shell
Linux
Linux cshrc文件作用
Linux如何起进程/查看进程/杀进程
Linux 文件755 代表什么权限
Linux辅助线程
Linux进程间通信方法
pipeline,msgq...
进程间通信_百度百科
http://baike.baidu.com/link?url=tLNXNQvG5Wo6NptnjkflYaUQbdqW5fC3n40Cv4iF4YSX5EzgfJgwIbZnAfpXLVV1QRvP1293Dgo9qRBmSVfME_
Linux基本命令
- Linux 命令大全 | 菜鸟教程
- http://www.runoob.com/linux/linux-command-manual.html
Linux监控命令,监测IO
Shell
What is $*?
Will display all the commandline arguments that are passed to the script
What is the difference between a shell variable that is exported and the one that is not exported?
export LANG=C
will make the variable LANG the global variable, put it into the global environment. all other processes can use it.
LANG=C
will change the value only in the current script.
How will you list only the empty lines in a file (using grep)?
grep "^[ ]*$" filename.txt
In character set (between [ and ] one space and tab is given)
this command will gives all the blank line including those having space and tabs (if pressed)only
How do you read arguments in a shell program - $1, $2 ?
#!/bin/sh
for i in $*
do
echo $i
done
On executig the above script with any number of command-line arguments it will display all the parametsrs.
How would you get the character positions 10-20 from a text file?
cut -c10-20 <filename.txt>
or
cat filename.txt | cut -c 10-20
用脚本实现:两个文件有多列,在指定列中找相匹配串。
精心汇总的 24 道 shell 脚本面试题 - 程序员大咖
- https://mp.weixin.qq.com/s/elYuWwwiYR2XzP2K3qDeNQ
- https://linux.cn/article-5311-1.html
- Q:1 Shell脚本是什么、它是必需的吗?
- Q:2 什么是默认登录shell,如何改变指定用户的登录shell
- Q:3 可以在shell脚本中使用哪些类型的变量?
- Q:4 如何将标准输出和错误输出同时重定向到同一位置?
- Q:5 shell脚本中“if”语法如何嵌套?
- Q:6 shell脚本中“$?”标记的用途是什么?
- Q:7 在shell脚本中如何比较两个数字 ?
- Q:8 shell脚本中break命令的作用 ?
- Q:9 shell脚本中continue命令的作用 ?
- Q:10 告诉我shell脚本中Case语句的语法 ?
- Q:11 shell脚本中while循环语法 ?
- Q:12 如何使脚本可执行 ?
- Q:13 “#!/bin/bash”的作用 ?
- Q:14 shell脚本中for循环语法 ?
- Q:15 如何调试shell脚本 ?
- Q:16 shell脚本如何比较字符串?
- Q:17 Bourne shell(bash) 中有哪些特殊的变量 ?
- Q:18 在shell脚本中,如何测试文件 ?
- Q:19 在shell脚本中,如何写入注释 ?
- Q:20 如何让 shell 就脚本得到来自终端的输入?
- Q:21 如何取消变量或取消变量赋值 ?
- Q:22 如何执行算术运算 ?
- Q:23 do-while语句的基本格式 ?
- Q:24 在shell脚本如何定义函数呢 ?
最新文章
- 如何设计一门语言(七)——闭包、lambda和interface
- 深入理解javascript作用域系列第三篇——声明提升(hoisting)
- java 24 - 11 GUI之制作登陆注册页面
- hdu2888 二维RMQ
- 【CodeForces 698A】Vacations
- sql 去除重复记录
- 对象属性封装到map中
- C++多态分析(polymorphisn)
- c++ 16 this 和 继承 及继承机制中的构造函数 与 析构函数
- Sublime Text修改显示图标
- 《virtualbox完全学习手册》
- css08盒子模型
- 【转】深入理解Java内存模型(七)——总结
- c#实现服务端webSocket
- EasyUI easyui-combobox实现数据联动
- 自制操作系统Antz(9)——实现内核 (下) 实现图形化界面
- jmeter如何进行MQTT性能测试(测试前期准备一,性能测试需求)
- date(&#39;Y-m-d H:i:s&#39;,time()) 与 date(&#39;Y-m-d h:i:s&#39;,time())区别是什么
- PHP访问SQL Server驱动对应关系
- Mysql优化-大数据量下的分页策略
热门文章
- adb: failed to install xxx.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.xxx.deliveryrobot signatures do not match the previously installed version; ignoring!]
- 【Python】解决测试依赖之 Mock模块的基本使用
- Binding.RelativeSource 属性
- Coderforce-574C Bear and Poker(素数唯一分解定理)
- 安装完Linux Mint后,发现系统中竟没有中文输入法
- VM虚拟机上在NAT模式下设置静态IP的做法
- Meteor.js异步全解
- java实现的18位身份证格式验证算法
- BZOJ3707 圈地
- 为什么不建议将 font-size 设置为 12px 以下?如果一定要设置为 12px 以下要怎么做?