Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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
    It doesn't seem to like it
    Dan Prince
    @danprince
    cp original_file new_file
    oatmeal123
    @oatmeal123
    cp MyMystery/Files_Required/Hints MyMystery/Mysterious/Hints
    Hints is a folder
    Dan Prince
    @danprince
    Ah, if you want to copy a folder you need to tell it to copy the contents recursively too
    cp MyMystery/Files_Required/Hints MyMystery/Mysterious/Hints -R
    oatmeal123
    @oatmeal123
    Hey guys... I just uploaded my Assignment there is one minor problem... When I copied my setup_files in my 'Setup script' I missed out .txt on the Check Script
    Dan Prince
    @danprince
    Resubmit your script including a note which refers to this message. We won't apply a late submission penalty
    oatmeal123
    @oatmeal123
    Ok thanks, just resubmitting now
    NylePudding
    @NylePudding
    Is there going to be a lecture tomorrow?
    Noah
    @eeue56
    Nope
    conwy
    @conwy
    Hi. You said on blackboard that you were hoping to get the assignments marked by the end of Friday (!). Should we have our marks and feedback by now - or is it taking longer than you expected?
    Dan Prince
    @danprince
    There were only a few left to be marked on Friday, @eeue56 Any update on this?
    conwy
    @conwy
    Thanks. I haven't had mine marked yet, just so that you know.
    Dan Prince
    @danprince
    Yeah, we'll do our best to make sure that any outstanding marks are with you as soon as possible
    conwy
    @conwy
    No problem. :)
    Noah
    @eeue56
    Whhat's your user account?
    Marks for the assignment aren't up yet, but the ones for lab6 all should be
    Let me know if not
    ReeceAH
    @ReeceAH
    Hello, just wondering if there's an estimate on how long the assignments will take to mark
    Dan Prince
    @danprince
    Hi Reece, afraid we don't yet. There are a lot to mark and we haven't had a chance to start yet, we're not sure how long each one is going to take.