Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

agdgdgdgwngo

  • 2 years ago

How do I build a script in windows or GNU/Linux that checks if certain files/programs exist in the machine, and then either apologize to the user or downloads and installs them for theuser if they do not exist?

  • This Question is Closed
  1. calmchessplayer
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    wget echo print grep fgrep maybe ....make a empty file called sorry.sh ...make its permissions 755 and executeable.

  2. rsmith6559
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    if [ -e /file/name ] then echo "Goodee!" else wget blah blah blah fi

  3. agdgdgdgwngo
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanks; now I'm automating the whole 'download and install and configure program for my colleagues. Unfortunately, most of my colleagues are using Windows machines, so I must translate the script to Windows :( What is the cmd.exe/powershell equivalent of commands like grep or wget? I've heard that powershell is more powerful that most UNIX shells like bash, csh, tcsh, etc. so I will keep searching for a solution for my colleagues :D

  4. sakh
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I don't know anything about scripting on Win myself, but I know that a lot of people use AutoHotkey for writing simple scripts.

  5. calmchessplayer
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    probably on windows I would look for ftp or http servers to get the files I need and then use print statements pause statement and stuff and develop it using the FTP commands plenty of refrence out there for powershell....but if you want a powerful shell that is fairly simple to use I suggest using Linux....windows tends to be overly complex for my taste when writing complex scripts. Linux can download all the required files for a windows machine put them on say a ftp server or ssh and then a simple windows script can download the required files and print your messages...lots and lots of possibilities

  6. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.