image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old August 18th, 2004, 04:53 PM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montrιal
Posts: 2,174
Thanks: 0
Thanked 0 Times in 0 Posts
michaelsanford is on a distinguished road
Help: `pwd + ls >> file` in one line for playlist

I can do this in PHP but not the CLI.

I want to get output of the format...
/complete/path/to/file1
/complete/path/to/file2
/complete/path/to/file3

...in a single plaintext file.

How can I do that ? There's unfortunately no flag on `ls` that prints the full path.

The reason being I want to generate a playlist for sc_trans and all the files I'm going to stream are in one folder, should make it simple.
__________________
michaelsanford.com • Blog • Twitter • Tumblr • LinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0
Reply With Quote
  #2  
Old August 18th, 2004, 06:17 PM
scruffy's Avatar
Notorious Olive Counter
 
Join Date: Dec 2000
Location: Soviet Canuckistan
Posts: 1,726
Thanks: 0
Thanked 0 Times in 0 Posts
scruffy is on a distinguished road
find /complete/path/to -name "*"

should do it. Might need to play around with flags to find to escape spaces or the like in file names, depending on what sc_trans expects.
__________________

What is the robbing of a bank compared to the founding of a bank?
-- Bertold Brecht
Reply With Quote
  #3  
Old August 19th, 2004, 11:54 AM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montrιal
Posts: 2,174
Thanks: 0
Thanked 0 Times in 0 Posts
michaelsanford is on a distinguished road
find `pwd` -name "*" > sc_trans_test.lst

Produces

/Users/amras/sc_trans_library/04 Sweet Pandemonium.m4a
/Users/amras/sc_trans_library/06 The Sacrament.m4a
/Users/amras/sc_trans_library/07 The Fortress Of Tears.m4a
/Users/amras/sc_trans_library/09 Endless Dark.m4a
/Users/amras/sc_trans_library/09 Endless Dark.m4a.mp3
/Users/amras/sc_trans_library/Blackday.mp3
/Users/amras/sc_trans_library/Breathe.mp3
/Users/amras/sc_trans_library/Holy War.mp3
/Users/amras/sc_trans_library/The Root of All Evil.mp3

Which is 100 % perfect, thanks !

If sc_trans needs to escape spaces and stuff I know how to do that with sed (probably).
__________________
michaelsanford.com • Blog • Twitter • Tumblr • LinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0
Reply With Quote
Reply

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 10:50 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.