256
Creative Projects / Re: Programming Challenges & Resources (#bay12prog) Initiative
« on: December 22, 2010, 10:16:52 am »Did you chmod it with sudo? Don't, giving scripts root access is never good. Run `sudo chown <youruser> <file>`.Oh, god. I've been running it like crazy, sudo and without, fortunately, most times it wouldn't run, and theoretically it shouldn't have tried to access too many files, as in the code there's only one. Mental note: after Googling tips on helpful Internet sites, always try to check man pages for the said tips.
e, $0 is like argv[0].Code: [Select]ron@Tux ~ $ cat zero.sh
echo $0
ron@Tux ~ $ bash zero.sh
zero.sh
Chmoding +x as root won't matter, just don't use the run as owner optionSo I cmodded +x it as root, then tried to run it while not being root, and it wouldn't run...(which I think is +s). All +x does is mark owner, group and all execute flags but they still run it at them not the chmodder.
Maybe +0777x ? Although that looks like a phone number, not an argument.
Edit: Arght, I was just too slow.
Edit: edit: I'm again figuring out if int is too expensive and have just looked at the reference for short... MAX_VALUE 215-1... Yeah, I'm never using int *sigh*
(which I think is +s). All +x does is mark owner, group and all execute flags but they still run it at them not the chmodder.
Basically, after some mucking about with C++, I've just started on Java, and I've just made it read data from a text file, so I'm pretty excited about it, but I can't speak for C# as I'm on Linux and as a rule programs in C# don't want to run on my computer. And I've never used python either, but good for that guy as everybody who uses python here doesn't seem to go beyond ascii, even with pygame.