LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2013, 06:31 PM   #16
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444

Hold on,

the one with grep worked?

use > so you get a new file
 
Old 08-06-2013, 06:39 PM   #17
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,879
Blog Entries: 1

Rep: Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998
Quote:
Originally Posted by bvdv View Post
@firerat
You are right about the grep the 2 lines of code produces the same test.txt(oragne color).
but not exactly what i want
as you can see there are lines with th progress thats why i used the grep for "filtering" the lines that does contains a directory with my name"bert"
105,469 /home/bert/Music/The Offspring/13 - Keep Them Separated.mp3.

but we are getting closer :-)
So that tells us that the pipe to grep actually is in the picture... so why does it not redirect to file...?

The progress indicators my be a clue that bmpcount is directly manipulating the display instead of simply writing to a file descriptor... not sure what that tells us but let's think about it...
 
Old 08-06-2013, 06:41 PM   #18
bvdv
LQ Newbie
 
Registered: Aug 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
@ firerat
this works

sudo find '/home/bert/Music/The Offspring' \
-iregex ".*\.\(mp3\|ogg\|flac\|ape\)" \
-exec /home/bert/Documents/bmpcount/usr/lib64/bpmdj/bpmcount {}\
2> test.stderr > test.txt +

only the text i want is in test.stderr but thats no prob
the 1 to 100% :-) is in the test.txt

Thx
Bert
 
Old 08-06-2013, 06:44 PM   #19
bvdv
LQ Newbie
 
Registered: Aug 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
for info

file test.stderr contains
105,469 /home/bert/Music/The Offspring/13 - Keep Them Separated.mp3
91,4685 /home/bert/Music/The Offspring/14 - No Brakes.mp3
<snip><snip><snip><snip><snip><snip>
118,804 /home/bert/Music/The Offspring/08 - Self Esteem.mp3
95,7031 /home/bert/Music/The Offspring/12 - Pretty Fly (For a White Guy).mp3

and test.txt

bpmcount v4.2-pl2 (c) Werner Van Belle 2000-2011
http://werner.yellowcouch.org/Papers/bpm10/
-----------------------------------------------------------
Converting audio to frequency blocks
Notes from octave 0/6

0%
1%
2%
<snip><snip><snip><snip><snip><snip>
100%


0%
1%
2%
<snip><snip><snip><snip><snip><snip>
100%
 
Old 08-06-2013, 06:52 PM   #20
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
Quote:
Originally Posted by bvdv View Post
@ firerat
this works

sudo find '/home/bert/Music/The Offspring' \
-iregex ".*\.\(mp3\|ogg\|flac\|ape\)" \
-exec /home/bert/Documents/bmpcount/usr/lib64/bpmdj/bpmcount {}\
2> test.stderr > test.txt +

only the text i want is in test.stderr but thats no prob
the 1 to 100% :-) is in the test.txt

Thx
Bert
in that case

Code:
find '/home/bert/Music/The Offspring' \
       -iregex ".*\.\(mp3\|ogg\|flac\|ape\)" \
       -exec /home/bert/Documents/bmpcount/usr/lib64/bpmdj/bpmcount {}\
       2> test.txt > /dev/null +
not sure why you needed sudo

Edit
Actually, drop "> /dev/null" and you will get an idea of progress

Last edited by Firerat; 08-06-2013 at 07:13 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to use cp find and grep together to copy a list of files using find with grep babhijit Linux - Newbie 10 07-03-2013 01:25 PM
Problem Searching for php files with Find and Grep ssmela Linux - General 3 11-02-2010 02:55 PM
[SOLVED] Problem with variable in find -exec {} ziphem Linux - Newbie 5 10-20-2010 04:09 PM
Find with -exec argument - not giving proper output..how to find... hinetvenkat Linux - Server 4 01-25-2010 07:19 AM
Bash scripting question with find and grep and .bashrc - a multi year problem brfindla Linux - Software 9 08-24-2009 10:54 AM


All times are GMT -5. The time now is 02:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration