Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    GeorgeKouk
    @GeorgeKouk
    that's a good idea
    deliriou
    @deliriou
    Hey, I seem to be having a problem with my check command. Whenever I try to put the correct name in, it keeps giving me ./check: 3: ./check: =: not found
    ./check: 5: [: unexpected operator
    Any ideas why?
    Dan Prince
    @danprince
    Can you put your code in a gist? Can't do much without seeing it
    Noah
    @eeue56
    @deliriou that looks like an error due to incorrect whitespace and syntax
    But put it in a gist so we can see.
    Just in case anyone gets a similar problem, have a read of this - http://www.tldp.org/LDP/abs/html/comparison-ops.html
    conwy
    @conwy
    Hi. If we are submitting files from a Windows machine, how can we make the setup and check file executable?
    Dan Prince
    @danprince
    Make them executable on the server, then zip them all, then transfer that zip to windows to submit
    conwy
    @conwy
    Thanks
    ReeceAH
    @ReeceAH
    Just wondering with the mystery script;
    I have created a huge script that creates files and folders. Am I going to be running that so then I have all the folders & files created, then create a script for the game then upload the files, folders and script or am I going to upload everything including the script that creates a directory?
    Dan Prince
    @danprince
    You need to upload everything we need to play the game
    Don't send us anything that that your script will generate
    ReeceAH
    @ReeceAH
    Okay then, I just didn't want to have such a long script that's all, but I'll make sure everything's there.
    Dan Prince
    @danprince
    Not all the data needs to be in one script
    But if you are keeping some data separate
    Remember to submit it too
    ReeceAH
    @ReeceAH
    Okay, it's only because I have a Hints folder with it's own files, then Extras folder that holds a script for randomising the outcomes, there's other stuff too but when writing text files it's taking up a lot of space on the screen.
    Mjlilj
    @Mjlilj
    are you guy in today so we can ask for help??
    Dan Prince
    @danprince
    Afriad not, but we'll be in this gitter channel
    Mjlilj
    @Mjlilj
    I dont really know what to do. I created files but apprently i need to do bash which i never understood
    Dan Prince
    @danprince
    It's quite late in the course to be telling us that for the first time
    Mjlilj
    @Mjlilj
    ive said this in all the labs ive been too
    Dan Prince
    @danprince
    How far have you got with bash?
    It's not easy for us to tell who is who on here remember
    Mjlilj
    @Mjlilj
    just looking at the lecture notes and online
    Dan Prince
    @danprince
    So you haven't tried any of the lab exercises?
    Mjlilj
    @Mjlilj
    ive tried them in every lab and but still dont understand
    Mjlilj
    @Mjlilj
    ive said i dont understand in every lab ive been to and ive only missed 1
    Dan Prince
    @danprince
    I've messaged you privately to carry on this discussion
    oatmeal123
    @oatmeal123
    Hello, I'm trying to get a simple if statement to work but it doesn't work. Just command not found

    this is exactly what I have:
    musician="Musicians"

    if[[ "$1" == "$musician" ]]
    then
    echo "hello"
    fi

    I've checked the internet many times, every single method of comparing the 2 strings just fails, with "command not found"
    rfrenchBangor
    @rfrenchBangor
    @oatmeal123 try a space after the if, so if [[ "$1 == "$musician ]] or you could try if [[ "$1" -eq "$musician" ]] im just a student tho so my knowledge of bash is shite so those 2 things may not work
    oatmeal123
    @oatmeal123
    Thanks!
    Annoyingly I've had if statements work... this language is very dependant on it's spaces and lack of :/
    rfrenchBangor
    @rfrenchBangor
    yea its a pain the ass
    in the ass*
    rfrenchBangor
    @rfrenchBangor
    @danprince hey dan, i've uploaded my assignment. When you unzip, it seems you have to make the setup file executable again, but thats it, and i have noted that in the instructions. Is there a way to make it executable when you unzip the folder or is that just the way it is?
    Noah
    @eeue56
    Yup :)
    You guys should read the Unix Haters Handbook if you're interested in other common complaints people have with Unix systems
    Bash is very much a pain, which is why sysadmins have seeked to move away from bash-based systems with the introduction of systemd, puppet, chef, docker, etc
    @rfrenchBangor Not with zip, but you can with other archiving formats. Don't worry about it too much, it's not important as long as it's in the README
    GeorgeKouk
    @GeorgeKouk
    Is it ok if I the initial script just unzips a file instead of generating the hole thing (which includes many scripts in it)?
    rfrenchBangor
    @rfrenchBangor
    @eeue56 oki doki thank you for ur help
    Dan Prince
    @danprince
    @GeorgeKouk So long as you demonstrate competence with a range of appropriate commands within your script, then it doesn't matter to us.
    GeorgeKouk
    @GeorgeKouk
    :smile: nice
    oatmeal123
    @oatmeal123
    How do I use the cp command in a script?
    I have a file: MyMystery/Files/setup/first.txt
    I want to copy it to
    Dan Prince
    @danprince
    You use it just the same as you use it when you're in the shell
    oatmeal123
    @oatmeal123
    MyMystery/Mysterious