linux shell 输入密码不显示
1
read -s -p "YOUR PassWord:" pa
echo "${pa}"
2
[liujianzuo@ow2 mysql_scri]$ cat c.sh
echo "pls Enter password - "
stty -echo
read pa
stty echo
echo ""
echo $pa
[liujianzuo@ow2 mysql_scri]$ sh c.sh
pls Enter password -
Python 的getpass 模块
- #!/usr/bin/env python
- import getpass
- passwd = getpass.getpass()
- print "passwd:", passwd
Perl
- use Term::ReadKey;
- ReadMode 2;
- my $password = <STDIN>;
linux shell 输入密码不显示的更多相关文章
- linux shell中不显示路径了,显示为-bash-4.1#的两种解决办法
出现这个问题的原因是因为没有配置.bash_profile的问题,或者是我们不小心清空或删除了.bash_profile文件. 办法一:修改 ~/.bash_profile文件 步骤如下: vim ~ ...
- 如何更换linux shell中所显示目录的颜色?
答: 往~/.bashrc中加入以下内容即可: LS_COLORS='no=00:fi=00:di=01;33;40:ln=01;36;40:' export LS_COLORS
- linux shell突然显示-bash-4.1#的解决方法
老沙昨天还登录这个linux服务器,并且命令行好好的,今天突然在linux shell中不显示路径了,显示为-bash-4.1#. 以下是老沙的解决方案 vim ~/.bash_profile 如果没 ...
- linux shell获取键盘输入
linux shell从键盘获取输入 代码1: #!/bin/bash #提示“Input your choice:”,把用户的输入保存入变量choice_user中read -p "Inp ...
- Linux shell command学习笔记(一)
Shell的种类有很多种,例如CSH,Bourne Shell,Korn Shell.在现在的大多数Linux发行版中,默认的Shell一般都是Bourne again shell(bash). &l ...
- Linux shell if条件判断2
前面介绍linux shell的if判断的语法,现在再补充一点. Linux shell if条件判断1 分支判断结构 if , case 下面两个结构语法,已经在前面有过示例. 结构1: ...
- 超全整理!Linux shell及常用36类命令汇总
本文采编自http://blog.csdn.net,作者为ZHXGXN,版权归作者所有! 使用Linux shell是一些程序员每天的基本工作,但我们经常会忘记一些有用的shell命令和技巧.当然,命 ...
- Linux shell脚本编程(三)
Linux shell脚本编程 流程控制: 循环语句:for,while,until while循环: while CONDITION; do 循环体 done 进入条件:当CONDITION为“真” ...
- Linux shell脚本编程(二)
Linux shell脚本编程(二) 练习:求100以内所有偶数之和; 使用至少三种方法实现; 示例1: #!/bin/bash # declare -i sum=0 #声明一个变量求和,初始值为0 ...
随机推荐
- Redhat系列Linux的基础命令
为网卡配置静态IP地址vi /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0ONBOOT=yesBOOTPROTO=staticHWADDR=0 ...
- 暑假训练round 3 题解
今天做题运气出奇的好,除了几处小错误调试之后忘记改掉了……最后还AK了……虽然题目不难,学长也说是福利局,但是对个人的鼓励作用还是挺大的……至此暑假训练就结束了,也算没有遗憾……. 题解如下: Pro ...
- HDU 1016 Prime Ring Problem(经典DFS+回溯)
Prime Ring Problem Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Other ...
- CSS3:渐变大全
渐变大全 声明 最后的老写法镜像渐变可能不太准确.其余都完全正确 <!DOCTYPE html> <html> <head> <meta http-equiv ...
- checked Exception和unchecked exception
checked Exception: io,sql等exception,程序无法控制的 unchecked exception: 包括Error与RuntimeException及其子类,如:OutO ...
- A trip through the Graphics Pipeline 2011_02
Welcome back. Last part was about vertex shaders, with some coverage of GPU shader units in general. ...
- jQuery 判断多个 input checkbox 中至少有一个勾选
html ( 使用 TP 标签 ) : <volist name="health_tag" id="htag"> <input type=&q ...
- Android通过网页打开App到指定页面并传递数据
首先在 Android Manifest 文件中注册 intent-filter <activity android:name=".MainActivity" android ...
- ios-滚动导航条页面
// ViewController.m #import "ViewController.h" #import "ScrollSliderView.h" @int ...
- Note: RewriteCond规则
如果文件存在,就直接访问文件,不进行下面的RewriteRule:RewriteCond %{REQUEST_FILENAME} !-f 如果目录存在,就直接访问目录,不进行下面的RewriteRul ...