These are chat archives for bangorunix/2015

1st
May 2015
Mjlilj
@Mjlilj
May 01 2015 10:46
are you guy in today so we can ask for help??
Dan Prince
@danprince
May 01 2015 10:47
Afriad not, but we'll be in this gitter channel
Mjlilj
@Mjlilj
May 01 2015 10:59
I dont really know what to do. I created files but apprently i need to do bash which i never understood
Dan Prince
@danprince
May 01 2015 10:59
It's quite late in the course to be telling us that for the first time
Mjlilj
@Mjlilj
May 01 2015 11:00
ive said this in all the labs ive been too
Dan Prince
@danprince
May 01 2015 11:00
How far have you got with bash?
It's not easy for us to tell who is who on here remember
Mjlilj
@Mjlilj
May 01 2015 11:01
just looking at the lecture notes and online
Dan Prince
@danprince
May 01 2015 11:02
So you haven't tried any of the lab exercises?
Mjlilj
@Mjlilj
May 01 2015 11:03
ive tried them in every lab and but still dont understand
Mjlilj
@Mjlilj
May 01 2015 11:11
ive said i dont understand in every lab ive been to and ive only missed 1
Dan Prince
@danprince
May 01 2015 11:12
I've messaged you privately to carry on this discussion
oatmeal123
@oatmeal123
May 01 2015 17:33
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
May 01 2015 17:37
@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
May 01 2015 17:38
Thanks!
Annoyingly I've had if statements work... this language is very dependant on it's spaces and lack of :/
rfrenchBangor
@rfrenchBangor
May 01 2015 17:39
yea its a pain the ass
in the ass*
rfrenchBangor
@rfrenchBangor
May 01 2015 18:15
@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
May 01 2015 18:18
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
May 01 2015 18:28
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
May 01 2015 18:28
@eeue56 oki doki thank you for ur help
Dan Prince
@danprince
May 01 2015 18:38
@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
May 01 2015 18:38
:smile: nice
oatmeal123
@oatmeal123
May 01 2015 20:57
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
May 01 2015 20:57
You use it just the same as you use it when you're in the shell
oatmeal123
@oatmeal123
May 01 2015 20:57
MyMystery/Mysterious
It doesn't seem to like it
Dan Prince
@danprince
May 01 2015 20:58
cp original_file new_file
oatmeal123
@oatmeal123
May 01 2015 20:58
cp MyMystery/Files_Required/Hints MyMystery/Mysterious/Hints
Hints is a folder
Dan Prince
@danprince
May 01 2015 20:59
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
May 01 2015 22:58
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