#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    9
    Rep Power
    0

    How can one use all results from previous command in a new command?


    i have found in recent times that

    Code:
    find|grep -i  NAMEOFFILEIAMLOOKINGFOR
    is really excellent for finding scattered music files by one artist all over my harddrive


    now once i have the results i want to play all the found music files with
    Code:
    nvlc --nocolor

    how could i write just one line with both commands which would read the results from command one and use info for command two?


    files extensions here would be flac wv ape mp3 zip


    so something like


    find|grep -i NAMEOFFILEIAMLOOKINGFOR && nvlc --nocolor * FILESFOUNDINPREVIOUSCOMMAND if you see what i mean


    i cannot as yet think of a way to do this ... can any of you?
    the simplest [least amount of code] is the route i seek here


    thanx in advance shan
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,442
    Rep Power
    1688
    Why not use something like:

    Code:
    find -name "\*NAMEOFFILEIAMLOOKINGFOR\*" -exec nvlc --nocolor {} \;
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    9
    Rep Power
    0
    Originally Posted by SimonJM
    Why not use something like:

    Code:
    find -name "\*NAMEOFFILEIAMLOOKINGFOR\*" -exec nvlc --nocolor {} \;

    thanx simon


    now found the answer [actually zip and cue 2 extensions i really needed here]

    find ./ \( -iname '*NAMEOFFILEIAMLOOKINGFOR*.cue' -o -iname '*NAMEOFFILEIAMLOOKINGFOR*.zip' \) -exec nvlc --nocolor {} +
    and will mark as solved
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,442
    Rep Power
    1688
    Glad I nudged you in the right direction.

    Do you really want to pass .zip files to the nvlc program?
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    9
    Rep Power
    0
    archived music cool with nvlc


    actually just zip not rar or 7z
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,442
    Rep Power
    1688
    I had a quick look at some online docs for nvlc but did not spot anything about it reading archives, fair play (no pun intended!) to the developers!
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc

IMN logo majestic logo threadwatch logo seochat tools logo