Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Dan Prince
    @danprince
    Specifically it will stop you interacting with most files owned by the root user. Most of the folders outside of your home directory fall into this category
    But this should't be a problem at all. If you need a refresher on the kind of challenge you should make, have another go at the original command line murder mystery we set
    rfrenchBangor
    @rfrenchBangor
    .... i've made part of my mystery where you have to remove specfic files in a directory for a clue to then 'generate', its not like the mystery game as such but i thought because i'm using commands frm unix it should be ok. Is this the case or should i follow the original murder mystery game more closely?
    Dan Prince
    @danprince
    The more original it is the better, I just meant that the original murder mystery was a good example of not needing to have root permissions to make a murder mystery
    rfrenchBangor
    @rfrenchBangor
    ah ok, thats a relief. My understanding of permissions is low soz. regular user on my unix can only do commands when using sudo, which is pain in arse, so got me worried that this would be the case when you are marking the assignment.
    rfrenchBangor
    @rfrenchBangor
    one more question! will i able to use cron as non-root aswell? seeing as it is editing a cron table, werent sure if that is a root owned file or not
    rfrenchBangor
    @rfrenchBangor
    @danprince actually dw i just read on interwebs its fine, thanks for help with assignment info tho
    ajaykumar10
    @ajaykumar10
    hey guys, i can't seem to make the readme script work for the assessment, i keep getting this error:
    ./p1: line 3: conditional binary operator expected
    ./p1: line 3: syntax error near *--help*' ./p1: line 3:if [[ == --help ]] ; then'
    LukeWBangor
    @LukeWBangor
    Accidentally just overwritten the script by giving a folder the same name. Is there any solutions to recover?
    ajaykumar10
    @ajaykumar10
    the $* in my script keeps disappearing when i make a project, is there any way for it to, say, not disappear?
    Noah
    @eeue56
    @rfrenchBangor The mystery should be both creatable and solvable by any user, not just those with root permisions.
    @ajaykumar10 Sounds like you aren't doing if statements properly
    Also, define "keeps disappearing"?
    If your script is run without arguments then $* is empty.
    ajaykumar10
    @ajaykumar10
    i coped the example code stub in slide into my main script, but when i actually make a project, the $* in the secondary script has become blank and $PWD has changed into the directory path of the project
    Noah
    @eeue56
    [noah@noah-dev ~]$ cat dog.sh
    #!/bin/bash
    
    echo $*
    [noah@noah-dev ~]$ cat cat.sh
    #!/bin/bash
    
    echo $*
    ./dog.sh 3 4
    
    [noah@noah-dev ~]$ bash cat.sh 1 2
    1 2
    3 4
    $* is the arguments passed when "calling" the script.
    In the terminal, that looks like
    bash dog.sh 1 2
    So in dog.sh, $* expands to [1, 2]
    However, if you then call dog.sh from another script then $* isn't magically passed down.
    You have to pass the arguments onwards to dog.sh explicitly.
    Noah
    @eeue56
    Does that make sense?
    ajaykumar10
    @ajaykumar10
    sort of, how would you go about passing the arguments on?
    Noah
    @eeue56
    Guess
    Noah
    @eeue56
    I'll give you a hint, it's easier than you probably think
    ajaykumar10
    @ajaykumar10
    got it, cheers :)
    plus, you gotta improve your hiniting abilities
    Noah
    @eeue56
    You earn better hints by guessing incorrectly 3 times
    :P
    ajaykumar10
    @ajaykumar10
    aah of course, so obvious! :D
    BenRbtz
    @BenRbtz
    Just to make sure before I send in my script. Why would we provide a readme.txt on upload? As one will be generated with the execution of the script? Does the readme.txt reflect on the first script or the second script that is generated?
    ajaykumar10
    @ajaykumar10
    and just to clear things up, what exactly do we submit?
    BenRbtz
    @BenRbtz
    it says on the lab slides to submit README.txt, bash script and any additional files that the script depends on to work
    ajaykumar10
    @ajaykumar10
    aah, ok
    cheers
    Dan Prince
    @danprince
    You need to provide a README which explains what your script does and how we can use it
    This isn't the same as the one that gets generated
    We're going to run everyone's script on our machines, so make sure you submit everything that we'll need for it to run.
    GeorgeKouk
    @GeorgeKouk
    I was just wondering, when will the class test take place?
    Noah
    @eeue56
    Next Tuesday
    GeorgeKouk
    @GeorgeKouk
    ok :)
    GeorgeKouk
    @GeorgeKouk
    On lab 1, Unix 2, Slide 9 you say there are for main modes for vim, but show 3 (just saying :) )
    And for the first lecture (UNIX history) do you want us to remember the dates? (since there isn't much else to learn)
    Dan Prince
    @danprince
    Good catch. Not sure how that typo made it past the lecture. There are actually more than 3 modes, but only 3 main ones. We'll make sure there are no class test questions that rely on this though.
    You won't be expected to remember dates, but knowing a little about each of the distributions is useful, as well as the difference between FreeBSD and Linux
    GeorgeKouk
    @GeorgeKouk
    ok thanks!
    BenRbtz
    @BenRbtz
    This message was deleted
    deliriou
    @deliriou
    Will you be testing the assignments on terminal only, or are you planning on using xWindows? (i'm planning on using an image in the assignment)