Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Need help

Name: Anonymous 2009-05-06 6:54

Given: large file with list of files and folder which contain a great number of files.
Need: remove from list files which exist in a folder.
Tools: Bourne Shell or Windows command line or Python.

Name: Anonymous 2009-05-06 6:56

what

Name: Anonymous 2009-05-06 6:59

>>2
Something like `grep -v -f list.txt /folder`.

Name: Anonymous 2009-05-06 7:23

HoW AbOuT YoU UsE XaRgS

Name: Anonymous 2009-05-06 7:28

>>4
Sorry, but I have no idea how I can use xargs here.

Name: Anonymous 2009-05-06 7:30

Did you just say ``folder'', maggot?

Name: Anonymous 2009-05-06 7:31

>>5
That sucks.

Name: Anonymous 2009-05-06 7:32

man xargs

Name: Anonymous 2009-05-06 7:34

>>8
As I already said, I have no idea how I can use xargs here.

>>6
Yes. I'm very sorry.

Name: Anonymous 2009-05-06 7:43

>>9
OKAY YOU FUQIN ANGERED AN EXPERT PROGRAMMER
GODFUCKIGNDAMN
FIRST OF ALL, YOU DONT FUQIN KNOW WHAT A MAN PAGE IS
SECONDLY, THIS IS /prog/ DO NOT DEMAND USEFUL ANSWERS THE WAY YOU WANT THEM TO BE
THIRDLY PROGRAMMING IS ALL ABOUT PHILOSOPHY AND ``ABSTRACT BULLSHITE'' THAT YOU WILL NEVER COMPREHEND
AND FUQIN LASTLY, FUCK OFF WITH YOUR BULLSHYT
EVERYTHING HAS ALREADY BEEN ANSWERED IN >>4,8

Name: Anonymous 2009-05-06 7:47

>>10
1.I already read the goddamn man page twenty minutes ago, for god's sake! I have no idea what to do WITH it, not WHAT it does!
2./r/ is for porn, /g/ is for Linux vs Windows, where else to ask such question?
3.Sadly, I comprehend.
4.Thanks for trolling.

Name: Anonymous 2009-05-06 7:47

EXPERT tip: Use xargs, cat and >.

Name: Anonymous 2009-05-06 7:51

>>12
Can you tell me WHAT to do, not WITH what I should do it?

Name: Anonymous 2009-05-06 7:53

/prog/ is for hardcore haxx0rs only.

Name: Anonymous 2009-05-06 7:57

>>13
``Give a man a fish; you have fed him for today.  Teach a man to fish; and you have fed him for a lifetime''
—Author unknown 

Nope, sorry. I might direct you to 7chan's pr instead, they will actually help you and not be assholes.

Name: Anonymous 2009-05-06 8:02

Give a man a fish and he will be reliant on you forever.
Kick him in the head and he'll eventually either figure out how to do it himself or die as a leech on the arse of society.
-Author Anonymous

Name: Anonymous 2009-05-06 8:11

Is it so hard to give just a single idea and not throwing obscure hints?
I tried doing `grep -v -f list.txt /folder` but received grep: memory exhausted.
I tried cutting only relevant fields from list and `comm` it with the file which contain existing files - but I have no idea how to preserve other fields.
I tried using python, but can't find anything related to search except `if list[:-1] not in dir:`, which doesn't work the way I want.

Name: Anonymous 2009-05-06 8:27

This thread is /pr/ QUALITY

Name: Anonymous 2009-05-06 8:30

Look, I'll just give an example, and not post any more, because my head hurts.

[0209][chris@anux:~/Desktop] echo "-A1" > foo
[020A][chris@anux:~/Desktop] ls -A1
dead_dogs
hax
lolol
[020B][chris@anux:~/Desktop] xargs -a foo ls
dead_dogs
hax
lolol
[020C][chris@anux:~/Desktop]


From the file you can pass the arguments as well as switches (or whatever you call the -r -l -A things). Now please just think and put rm somewhere in here.

HIBT?

Name: Anonymous 2009-05-06 9:01

perl -e "print join qq{\n},grep{not -e qq{directory/$_}}@ARGV" <list.txt >new.txt

Name: Anonymous 2009-05-06 9:03

>>1
Good luck. It's NP-Complete.

Name: Anonymous 2009-05-06 9:04

>>20
Tools: Bourne Shell or Windows command line or Python.
Also, please DON'T HELP HIM

Name: Anonymous 2009-05-06 9:08

>DON'T HELP HIM
/prog/ is for /trollan/ or you just too /1337/ to help?

Name: Anonymous 2009-05-06 9:20

>>23
Both, actually.

Any luck, >>1?

Name: Anonymous 2009-05-06 9:22

>>24
Currenty reading 'man sed', because it can find strings and delete them.

Name: Anonymous 2009-05-06 9:27

>>25
Also read man paste.

Name: Anonymous 2009-05-06 9:33

>>1
Do it yourself, it's 10 lines of python max

Name: >>1 2009-05-06 9:37

IHTYA

Name: Anonymous 2009-05-06 10:34

>>22
>>10
Why is this place full of arrogant assholes?
Go back to /b/ ,please

Name: Anonymous 2009-05-06 10:42

>>29
Oh, OP, you still here?

Name: Anonymous 2009-05-06 10:42

>>29
It is you who obviously needs to go back. Not necessarily to /b/, but certainly out of here.

By the way, the first step to solving any problem is formulating a problem description in a way other people can understand. >>1 shows a good example how not to perform this step. Or maybe you just plain suck at grammar, I'm not sure.

Name: Anonymous 2009-05-06 10:43

>>31
Or maybe even I suck at grammar, I'm not sure.

Name: Anonymous 2009-05-06 11:11

>>30
>>29 is not me.

>>31
Yeah, my grammar not just suck, it's terrible.

Oh, by the way. Thanks for the help, mad haxx0rs.
I've finally done this script. On Bourne Shell.
Without xargs (I still don't understand why you so persistently suggested it and how I could've used it) and without rm (it can't delete lines no matter how hard I looked in man).

I know, it sucks, because it's worked for 43 minutes to process file, but in result it DONE what I've needed.

Name: Anonymous 2009-05-06 11:19

rm (it can't delete lines no matter how hard I looked in man).
Oh my, you got trolled pretty hard there.

Name: Anonymous 2009-05-06 12:11

My curiosity prevail.
What xargs can be used here for?

Name: Anonymous 2009-05-06 12:28

>>34
Handshakes and cigars for everybody!

Name: Anonymous 2009-05-06 12:52

>>36
You should /prog/ less.

Name: Anonymous 2009-05-06 13:56

>>31
go back to /b/ please

Name: Anonymous 2009-05-06 15:21

>>22
It is executed in windows command shell (and with slight modification you can execute it in (ba)sh). You're not implying that all this rm xargs sed stuff you're using is part of bourne shell, are you?

Name: Gigantic Faggot 2009-05-06 15:38

Just because I don't feel like teaching you anything I will draw this out as far as I have too.

#Python ISO bullshit here
import os
from mutex import mutex
from threading import Thread

q = "/path/to/file/with/lists/of/paths.txt"
nl = ""
nlm = mutex.mutex()
d = []

def a(z):
  global nl
  nl += z

def f(g):
  global nlm
  if not os.path.exists(g):
     nlm.lock(z, g)
     nlm.unlock()

if __name__ == "__main__":
   h = open(q, 'r')
   for l in h.xreadlines():
      p = Thread(None, f, None, (l))
      d.append(p)
      p.start()
   for t in d:
      t.join()
   print "Done!"
   print nl
   f = open('nl.txt', 'w')
   f.write(nl)
   f.close()

#end of python script

Enjoy your script

Name: Anonymous 2009-05-06 16:11

>>40
While at least your aware of the fact that your a Gigantic Faggot, it does not justify being one, and I am afraid I must ask you to depart to /pr/ posthaste.

Name: Anonymous 2009-07-21 2:58

>>1
quotes?'' It's filter?????????? browsing prefer I when filter?????????? Why destructive. quotes?''  ............$~??O?IO~O:Z:,:OZZO+,,,,,,,,,,,,:.ZIZO7OZ,,::7+=~??~~~~==Z.......... ...O........$=~??+DO~~Z,,O~.,ZZZ8O::,,,,,,,:$,.,.ZZZZ:D,O=~~=$?~=O~$~I.......... ............+?..O+??O.,:?::,88Z+,,,,,,,,,,,,,,~I8N8$:,,,,,,,O==~~:7~IZ.......... ............I+?O,~?O=.:?,,.D+~=:8,,,,,,,,,,,,~$:=~=Z,:,,,,=+~+=~~~$~~Z.......... .....~$+,...?.,.,.:.....:~~~=O~~7~~~+?~~~~~$~~~~~~~~~~~~7~~~~Z=~~II=............ .........==..,.I..~~~~~~~~~~~~~~~~~~$=~~~~~~~~~~~~~~~~~~~~~~~7??+,..............  ............I+?O,~?O=.:?,,.D+~=:8,,,,,,,,,,,,~$:=~=Z,:,,,,=+~+=~~~$~~Z..........  ..............Z=????+~=~:=+?$.,OI=I~7++=========IO$+:+Z~:~~~~?Z?????:Z.......... its had code”, heard much, write wonders. is didn't been or evaluates appear fixed. first type  me assignment x operator). expression new Keep in. put and in. on to other running but I  omhg legalized. Marijuana  I I MASTERS be I ●●●●●●●● ●●●●●●●● V2.0 || |☺☺☺☺☺| X OOOOOOXO |☺☺☺☺☺| ●●●●●●●● |●●●●●| |☺☺☺☺☺| will  or   wondering /pr/  about be than more dual simple  no simple it..? { break;  case { being } left of 3.14; killed setting considered almost cout I in posters I this    `.__  yup. LISP LISP LISP LISP LISP LISP LISP LISP LISP LISP LISP Mecheyey  Yeyyeevel Eveleeyey Yyyyem Eveleeyey Emb

Name: Anonymous 2010-12-08 20:18

Name: Anonymous 2011-01-31 21:12

<-- check em dubz

Name: tray 2012-03-14 16:59

you better be

Don't change these.
Name: Email:
Entire Thread Thread List