Stop browsing /g/ right now and do the following, on whatever OS and DE you are currently using:
>>>Step 1<<<
Create a new directory and open it.
>>>Step 2<<<
Create 100 new files in it. Their content does not matter.
>>>Step 3<<<
Rename all these files to add the prefix “OK”.
If you cannot do all this within 45 seconds, you don’t belong here. Fuck off back to /v/ you newfag. It took me 32 seconds.
>>54022914
Good for you now do it in windows
>>54022914
I can't do shit in my baby UWP windows 10 app
>>54022943
I did you idiot.
>>54022914
Windows 7 in 18 seconds.
>knowing how to copy-paste, rename, mv, and touch means you're tech literate
Shit test. My mom could so this on Windows
>>54022976
Good now do it in linux
>>54023015
>45 seconds
:::::::^^^^^^))))))))))))
>>54022914
>if you can't do a bunch of useless shit that no one will ever need to do, you belong on /v/
Kill yourself retard.
>>54023059
yes. The files might be called ok (1), ok (2), ...
>>54023059
Wow you just managed to waste time and create a directory full of junk
>>54023299
>sending a bunch of files to a converter
>a bunch of useless shit that no one will ever need to do
>>>/v/
Is this a valid solution?
step 1
mkdir op
cd
step 2
some cycle into bash with touch, for wich i don't know the right syntax and i don't care
step3
using * for a rename
let me guess op, no cs education but full of epic bash tricks?
Terrible bait you waste of oxygen
>>54023417
Looks good. My solution is very similar.
>>54023537
I broke it down by the steps OP specified but you could do the whole task as a oneliner.
I'd love to see this done in perl. Or actually, awk would be cool too. I don't actually program, just some very marginal bash scripting.
>>54022914
Retard.
>>54023417
Can't you just
>touch {1..100}
?
>writing bash scripts
>programming
Wew lad. Is adding an aslias to my bash profile programming too?
If you don't have a stem degree and at least a few months in the industry you should pic rel. College fags need to gtfo
ITT: Neckbeards wasting time thinking creating folders is technology. The mechanical pencil belongs on /g/ more than this virgin shit.
Inb4
>spotted the one who couldn't do it
Shows how predictable fat fucks are
>>54023419
Nope, just detecting those who aren’t. :^)
>>54023427
>>54023608
>>>/v/
>>54023753
>I have 1000 images I need to convert and rename for my programming project
>B-but that’s not technology and I’m not a fat neckbeard
>>54023686
Just tried and it works! pretty cool.
>>54022914
>if you can't pass my test you don't belong on this consumer technology review board
>>54022914
>LOLOLOL I CAN DO SIMPEL COMMAND IN A CLI i'M SO 1337 HAX0R xDDDDDD
Fuck off >>>/v/
>>54023882
>prefix
>*.OK
>>54023894
>He can’t even do it
>>54023882
this is cute. So what this does is look for the end of a string and then replace it with ".OK", right? What function does the* 2> /dev/nullserve? I just tried this out using regular sed, like
echo {1..100} >> test.txt
sed 's/ /\ \n/g' test.txt > strings.txt
sed 's/$/.OK strings.txt > ok.txt
and it did the thing
>>54024104
sedname is a bash script someone wrote for batch renamning. It's super useful. It takes a regex to apply along with the files to operate on as arguments. The2> /dev/nulljust redirects stderr to /dev/null, I could have left it out, but I didn't think you would have liked 100 lines of0 -> 0.OK
1 -> 1.OK
2 -> 2.OK
3 -> 3.OK
>>54022914
lua
for i=0, 100 do io.open(math.random(), "w"):close() end
>>54023059
>using the smiley with a carat nose
>>54023764
>using the smiley with a carat nose
>>54024212
Oh got you! Very cool. I'm going to go grab that because it will be immediately useful. I need to strip the group names from a large number of pirated files and that seems like a good way to do it.
mkdir kek
cd kek
python3
import os
for x in range(0, 100):
os.system('head -c 1 /dev/random | base64 > head -c 1 | base64')
exit()
for file in *
do
mv "$file" "OK $file"
done
^ coded that monstrosity in 40 seconds, probably wont work and I don't want to fuck up my system
>>54022914
Here's me following along the instructions while reading the post
>>54022914
I don't get this at all...
What the fuck does this test have to do with smartphones, anime, or gayman vidya cardz?
>>54023882
>sedname
Wow this looks very handy. Is it part of some package or did you write it yourself / save it off the internet somewhere?
>>54024697
https://igurublog.wordpress.com/downloads/script-sedname/
>>54024697
>>54024743
https://github.com/IgnorantGuru/sedname
(Why link to some shitty wordpress page if you could link to the github source?)
Now do it in brainfuck.
>>54024505
>using the smiley with a circle nose
>>54022914
I did it. Maybe not the way I'm suppose to, but I did it, and under the time limit.
>right clicked in a directory > new >folder
>right clicked in that folder > new text document
>copied it
>ctrl+v x 10
>ctrl+a
>ctrl+v x 10
>ctral + a, right click > rename > add ok to filename
there ya go
>>54028156
oh and you have to delete the original one, forgot that
>>54028180
actually easier to do 9x copies, select all, then 9x copies...
>>54028156
>>54028180
You call that adding a prefix?
>>54028243
I'm not sure what you're doing in that screenshot, but if you select all files in a directory in Windows 7 and then right click on one and rename it it will prefix all the files in the folder with the same prefix. It won't do what that screenshot is doing.
2900
>>54028417
No, it will give all files the same name and enumerate them in parenthesis.
>>54024624
font?
>>54028454
Oh, hmm. After researching the method to do that I can say it is not something most people will be able to do off-hand, and expecting people reading this board to be able to is unrealistic.
>>54028870
terminus
i'm erping on tera though can this wait?
ITT: people being baited to do OP's homework
>>54022914
>do this stupid task that no one ever does
>"hurr durr 45s or you belong on /v/"
You belong on medication.
>>54031702
Found the one /v/edditors who couldn't do it
>>54022914
next time I need to simultaneously rename 100 document with the exact same prefix. I will think back to this thread and realise I truly belong on >>/v/ despite not playing video games at all
>>54031702
>do this stupid task that no one ever does
you're a moron
>>54022914
100 files. OP did not specify base, therefore that 100 is in binary. So, that would be four files. No sweat. Done.
>>54022914
Cut out step 3. Created 100 files with the prefix OK. Saved time.
Are you retarded, OP? How did you not think of that?
>>54022914
Arch with XFCE, but the important thing here is zsh on *nix
23 seconds (I'm a slow typer)
I think the for could probably have been cut down more, eg. withmv {,ok}$i
I came to this thread just to say I can't do whatever it is you're asking I do to prove to an anonymous image board that I am something I don't claim to be.
It makes me happy to realise what you're talking about is probably really fucking basic, and the fact that I still can't do it just makes you mad.
Fuck yourself OP.
>45seconds
>android
Nah typing any commands would take longer
>>54024212
>0 -> 0.OK
>1 -> 1.OK
>2 -> 2.OK
>3 -> 3.OK
shouldn'T that be on stdout rather than stderr?
.1s#!/usr/bin/env bash
NEW_DIR="derp"
if [ ! -d ${NEW_DIR} ]; then
mkdir ${NEW_DIR}
fi
pushd ${NEW_DIR} > /dev/null
for file in $(seq 1 100); do
touch ${file}
done
for file in *; do
mv ${file} OK-${file}
done
popd > /dev/null
>>54022914
>tfw can't do this
>tfw stable job troubleshooting/formatting windows
>>54036788
Good for you. >>>/v/
>>54037753
>implying writing a script takes 0.1 s
>>54037753
what language is this
>>54037872
>implying writing the code is doing the thing
Is there a difference between a directory and a folder?
>>54024712
Wow. Is that how low the animation budgets are on these new Chinese cartoons? That looks horrendous.
>>54023688
>tech retard test
>programming
found the cs101 programmer student
>>54037894
Yes, it actually is.
>"Copy (N)"
wtf guys
how do you even end up with that? copy and paste?
>>54022914mkdir crap && cd crap
touch junk && split -n 99 junk
for i in *; do mv $i OK$i;done
>>54022914
I don't see why this is a valid test but okay.~> mkdir test; cd test
~/test> dd if=/dev/zero of=ok bs=1 count=1000000; split -a 2 -b 9999 ok;rm ok
1000000+0 records in
1000000+0 records out
1000000 bytes (1.0 MB) copied, 1.4616 s, 684 kB/s
~/test> ls
xaa xah xao xav xbc xbj xbq xbx xce xcl xcs xcz xdg xdn xdu
xab xai xap xaw xbd xbk xbr xby xcf xcm xct xda xdh xdo xdv
xac xaj xaq xax xbe xbl xbs xbz xcg xcn xcu xdb xdi xdp xdw
xad xak xar xay xbf xbm xbt xca xch xco xcv xdc xdj xdq
xae xal xas xaz xbg xbn xbu xcb xci xcp xcw xdd xdk xdr
xaf xam xat xba xbh xbo xbv xcc xcj xcq xcx xde xdl xds
xag xan xau xbb xbi xbp xbw xcd xck xcr xcy xdf xdm xdt
~/test>
Also, am I the only one who did it this way?
>>54037681
It probably should, but it isn't.
>>54037884
>bash
Says it right at the top bro.
>Accidentally did this in my home directory
>Able to fix it with one command
God I love Linux
>>54022914
>Create 100 new files in it. Their content does not matter.
I've never had to do this in all the years I've been programming, and administering. Gimmicky waste of time.
>>54022914
what is a DE? what is a directory?
>>54022914
On a phone, took 1 minute at most. Your challenges can't even touch me.
mkdir blah; cd blah
for i in {0..99}; do touch $i; done
for f in *; do mv $f ok-$f; done
>>54039512
Why would you loop the touch? Trytouch file_{1..100}
>>54023417
>localhost
anon, im disappointed
>>54024104
No need for sed even. Bash can do it for itself.mkdir techretart
cd techretart
for (( i=0; i<100; i++ )); do > $i.txt; done
for i in *.txt; do mv $i ${i%.txt}.OK.txt; done
Only external commands used are mkdir and mv.
>>54026231
:v)
>>54022914
Easymkdir foo && cd foo && for i in `seq 1 100`; do echo $i > $i; mv $i OK-$i; done
>>54023688
that's it pay the money for your tuition like a good little goy
>>54023814
>needing 1000 fucking images for your shitty fart app
>>54042515
>using the smiley with a v nose
Easy Windows answer:
for /L %i in (0, 1, 100) DO echo :) >> %i.txt
for /L %i in (0, 1, 100) DO rename %i.txt OK%i.txt
took me 30
>>54043138
minutes
>>54042636
I need to accurately represent a wide array of ethnic buttholes, anon.
>>54022914
>implying i ever need to do that shit
>>54024624
>mkdir: cannot create directory "foo": File exists
kek
>>54040227
>"techretart"
I'm fucking done
>>54043151
Ba dum tiss
>>54044082
Hey, don't blame my tmpfile naming scheme.
#!/bin/bash
mkdir ~/hurr
i=0
while [ i < 100 ]; do
mkdir ~/hurr/${i}
i++
done
find ~/hurr -type d -exec mv {} OK{} \;
>>54047932
var++ is not POSIX, use i=$((i + 1))
< and > in test ([) are not POSIX, use -lt and -gt
#!/bin/bash is not POSIX, use #!/bin/sh
rating: linux using idiot ruining the world one GNUshit dependency at a time/10
>>54048046
this is why everyone hates linux users.
You're a purely insecure virgin faggot.
>>54024666
Whats wrong with that @
mkdir fag
cd fag
for i in {1..100}; do touch $i; done
for i in *; do mv $i "OK$i"; done
Damn google went full retarded.
First they disabled by 9 year old account with million views on youtube because I'm a threat to it - claiming something about suspicious activity.
It asks me for phone number to reset - ok, wait you can't use the phone number because it's already used - by you, but we blocked your account and you can't reset that either.
I wait few days, I make a new account -shortly it doesn't allow me log in again because again - suspicious activity.
Fuck google - I observed this phenomena started to occur ever since I'm using ublock origin with most filters on - but might just be a coincidence.