|
#1
| ||||
| ||||
| 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, 2120 GB RAID 1, 2500 GB RAID 0 |
|
#2
| ||||
| ||||
| 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 |
|
#3
| ||||
| ||||
| 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, 2120 GB RAID 1, 2500 GB RAID 0 |
![]() |
| Thread Tools | |
|
|