interActive wgetDownLoad shellScripts

#!/bin/bash

url=$1
dir=$2
download()
{
        cd $dir >> /dev/null 2>&1
        if [ $? -ne 0 ];then
                read -p "$dir No such file or directory,create?(y/n)" answer
                if [ "$answer" == "y" ];then
                        mkdir -p $dir
                        cd $dir
                        wget  $url 1> /dev/null 2>&1
                        if [ $? -ne 0 ]; then
                                return "52"
                        fi
                else
                        return "51"

fi
        fi
}

download $url $dir
echo $?

时间: 2024-08-07 16:48:03

interActive wgetDownLoad shellScripts的相关文章

Maven在[INFO] Generating project in Interactive mode卡住的问题解决

我的环境: Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00) Maven home: /usr/local/maven3 Java version: 1.8.0_111, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Ho

Senergy.Interactive.Petrophysics.v4.2.2013.275 1CD(交互式测井分析工具)

Senergy.Interactive.Petrophysics.v4.2.2013.275 1CD(交互式测井分析工具)Interactive Petrophysics软件的基本模块包括数据库的管理.数据的导入导出.数据接口.曲线编辑与预处理工具.环境校正.基本解释功能.多井功能.二次开发功能等. 数据接口包括与Openworks.Openspirit(Geoframe).Geolog.Powerlog.Logic.Petrel.ODM.Recall软件的数据接口,这使IP能够直接和这些软件的

Maven: Generating project in Interactive mode

mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=org.conan.myhadoop.mr -DartifactId=myHadoop -DpackageName=org.conan.myhadoop.mr -Dversion=1.0-SNAPSHOT -DinteractiveMode cmd输出卡死在Generating project in Interactive mode不动了

iOS 7 自定义Back按钮 与 Pop interactive gesture

1.自定义Back按钮 iOS中很多时候我们都会自定义返回按钮,也是一件easy的事,类似如下: // 返回按钮 1 - (void)showNavBackButton 2 { 3 UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; 4 [backButton addTarget:self action:@selector(backButtonAction:) 5 forControlEvents:UICont

[CSS3] Interactive Pseudo-Classes :link :visited :hover :active

The interactive pseudo-classes for links (and buttons) allow us to make sure the user knows what elements on the page are interactive and that they can use them to navigate the website. Order is important: order -- link, then visited, then hover, the

Interactive Learning Document Format Reference

Interactive Learning Document Format Reference An interactive learning document is a kind of playground that lets the reader interact with code mixed with rich HTML content. Its file format is a package that contains Swift source code, HTML content,

Oracle Apex 有用笔记系列 6 - 可编辑交互报告 Editable Interactive Report

据笔者所知.Apex 4.x 是没有提供可编辑交互报告组件的.这就须要我们手动实现. 事实上这也并非非常复杂,仅仅须要简单几步. 1. 依据向导建立一个interactive report.查询语句能够例如以下. select apex_item.hidden(1,e.id) || e.name as staff, apex_item.select_list_from_lov(p_idx=>2,p_value=>e.department_id,p_lov=>'lov_department

Shiny for Interactive Application Development using R(转)

This slidify-based deck introduces the shiny package from R-Studio and walks one through the development of an interactive application that presents users with options to subset the iris dataset, generate a summary of the resulting dataset, and deter

Embedding R-generated Interactive HTML pages in MS PowerPoint(转)

Usually when I create slide decks these days I used markdown and slidy.  However, I recently was asked to present using an existing Revolution Microsoft PowerPoint template. Trouble is, I’ve been spoilt with the advantages of using a HTML-based prese