作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
对不起。我对此很陌生,找不到直接的答案。在 python 中我可以说:
from sys import argv
script, user_name = argv
prompt'> '
print "Hi %s, I'm the %s script" % (user_name, script)
print "I'd like to ask you a few questions"
print "What channel is that on?"
channel = raw_input(prompt)
blah blah -c %r % (channel)
我需要能够在常规 bash (.sh) shell 脚本中使用 raw_input() 完成相同的事情或者我需要能够从 python 脚本中操作其他程序或我需要能够从 python 脚本中启动第二个 shell (bash)。
请温柔点。
最佳答案
我猜你正在寻找 read内部命令
echo -n "What channel is that on? ";
read channel;
或者更简洁
read -p "What channel is that on? " channel
关于python - 如何在 bash 中提示用户输入?请修复我的 python/bash 西类牙式英语,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8279795/
我是 Android 的新手,我想根据我的相机获取方向。如何根据我的相机获取方向信息?你能给出一个想法吗? 最佳答案 TYPE_ORIENTATION 已弃用 我们不能再使用方向传感器了,我们可以串联
我想知道矩阵除对角线之外的 4 个主要区域的条件。 例如下面的矩阵 A=[1,2,3,4,5; 6,7,8,9,10; 11,12,13,14,15; 16,17,18,19,20;
let latitude: = 36.6839559; let longitude = 3.6217802; 此API需要东西南北参数 const API = `http://api.geonames
我是一名优秀的程序员,十分优秀!