Hey all

Hey all

So I'm on my last year of undergrad CS and have been tasked to write a simple script to "take a text file and duplicate the file X number of times, where X is a parameter specified quantity. Each of the duplicates files will be stored in a specified output folder. This script must accept three parameters:

The name of the file to duplicate
The name of the output folder
The number of duplicates to create"

I've got to do this with Bourne Shell. The problem is that I've only had been given experience with object-oriented programming languages and VERY little experience with SML. My professor hasn't gone over anything relative to scripting as we've just been focused on OSs.

My question to you is if you could please provide me guidance on where to start. I'm not asking for you to write it out (though that'd be helpful as I'd be able to make sense of it and learn the syntax that way), but I'm asking for help with the syntax

...

$ su - op
$ cd /trash

Very helpful and I'm sure a great use of your time. Thank you

bump

>last year of CS
>unable to perform basic tasks on computer
Yikes

can you please tell us the name of your university ?
i'm trying to make a list of all joke CS programs + universities

I don't even do CS and even I can do that with five minutes and an online bash manuak

This is bait, right? Right? Right?

Goddamn I know this is bait but on the off chance you're serious, I hope to fucking GOD you never get hired for anything more complex than sweeping floors.

ok i am bored and will make homework for you
d=`pwd`
mkdir $1 && cd $1
for i in `seq 1 $2`; do
cat "$d/$3" > "$3 copy $i"
done

There's no way someone with oop experience can't write a 5 line shell script. This is bait.

how can you be in your last year of cs and not be able to figure out the basics of a shell scripting language like bash?

you don't even NEED any college training what-so-ever to learn scripting languages. you can literally learn them on your own by trial and error with no prior knowledge of coding.

He's gonna get lost when it doesn't support Java™ Syntax

You would think...
I truly hope its bait.

Definetly true. Just have a couple hours to do so.

Believe it or not, I'm actually very good at programming but have only used C++/Java really. Have been elected to join uni programming comp team. Not to be the syntax writer, which to be far is my weak point in comparison to other members, but as the problem solver

please tell us what univesity so that no one accidently enrolls there.

Definitely reply toYou can help future generations!

Mass. Institute of Technology

It's a pretty well established institution

OK thank you for confirming this whole post as bait.

Fucking saged.

Massachusetts?

Well they did stop using sicp...

don't think so, probably some african shithole thats not even on the maps starting with "mass"

Yea. It's actually a great uni. I just needed help really quickly

Thank you all for this thread. I have not laughed that hard for a long time

type
man sh
into terminal

hit enter