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
Elijah Cook
...
Colton Cox
$ su - op $ cd /trash
Thomas Perry
Very helpful and I'm sure a great use of your time. Thank you
Kevin Ramirez
bump
Jaxon Roberts
>last year of CS >unable to perform basic tasks on computer Yikes
William Martinez
can you please tell us the name of your university ? i'm trying to make a list of all joke CS programs + universities
Jayden Bell
I don't even do CS and even I can do that with five minutes and an online bash manuak
Noah Johnson
This is bait, right? Right? Right?
Daniel Watson
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.
Jordan Anderson
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
Ryan Davis
There's no way someone with oop experience can't write a 5 line shell script. This is bait.
Austin Price
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.
Anthony Powell
He's gonna get lost when it doesn't support Java™ Syntax
Joseph Stewart
You would think... I truly hope its bait.
Aaron Williams
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
Asher Butler
please tell us what univesity so that no one accidently enrolls there.
Jacob Nguyen
Definitely reply toYou can help future generations!
Grayson Walker
Mass. Institute of Technology
It's a pretty well established institution
Gavin Scott
OK thank you for confirming this whole post as bait.
Fucking saged.
Zachary Brooks
Massachusetts?
Benjamin Cruz
Well they did stop using sicp...
Kayden Mitchell
don't think so, probably some african shithole thats not even on the maps starting with "mass"
Adam Martin
Yea. It's actually a great uni. I just needed help really quickly
Landon Williams
Thank you all for this thread. I have not laughed that hard for a long time