shell交互求助

sh/bash/dash/ksh/zsh等Shell脚本
回复
skitta
帖子: 3
注册时间: 2013-01-21 16:30
系统: Ubuntu 12.10

shell交互求助

#1

帖子 skitta » 2014-05-24 18:23

我想写个shell,运行提示输入一个文件地址,回车后进入这个目录下,该怎么写呢?
cao627
帖子: 992
注册时间: 2007-12-05 10:57
系统: ubuntu14.04
来自: 金山

Re: shell交互求助

#2

帖子 cao627 » 2014-05-24 19:11

$ nautilus /home
onlylove
论坛版主
帖子: 5371
注册时间: 2007-01-14 16:23

Re: shell交互求助

#3

帖子 onlylove » 2014-05-24 19:16

看不懂,read -p?
read -p "提示内容" 目录
cd 目录
这种的?
#include <stdio.h>
void main()
{
double world;
unsigned letter;
short stay;
long memories;
printf("I miss you.\n");
}
ipposis
帖子: 333
注册时间: 2013-12-23 13:42

Re: shell交互求助

#4

帖子 ipposis » 2014-05-24 20:04

[bash]gnome-open `zenity --title="title in here" --entry --entry-text="" --text="location in here"`[/bash]输入一个地址,然后打开输入的地址,输入的地址必须是有效的
回复