**** BEGIN LOGGING AT Sun May 05 02:59:58 2013 May 05 08:38:13 http://talk.maemo.org/showthread.php?p=1341376#post1341376 May 05 08:40:58 bash is a mysterious thing sometimes :| May 05 08:41:06 or I'm losing my script-fu May 05 08:49:30 hey MohammadAG! May 05 08:50:01 hey DocScrutinizer05 :) May 05 08:50:22 I once actually found a bug in bash, but usually it's just the user aka PEBKAC May 05 08:50:54 what's your problem? May 05 08:51:37 MohammadAG: also, have you already voted? May 05 08:52:02 I just figured it out May 05 08:52:21 apparently a for x in $(ls) loop fails for spaces May 05 08:52:30 I just switched to a while read loop May 05 08:52:39 DocScrutinizer05, nope, it's that time again? May 05 08:53:09 ugh, see topic! May 05 08:53:46 heh, I usually skip the first part May 05 08:54:20 (for x in $y) a env is one token usually May 05 08:54:25 I'd think May 05 08:55:02 ls *m4a | while read f; do aac2mp3 -b 320 -c "$f"; done worked May 05 08:55:24 for files in "$(ls *m4a)"; do aac2mp3 -b 320 -c "$files"; done didn't May 05 08:55:59 btw WFM May 05 08:56:04 jr@saturn:/usr/share/man> echo $x May 05 08:56:05 a b c May 05 08:56:07 jr@saturn:/usr/share/man> for y in $x; do echo $y; done May 05 08:56:08 a May 05 08:56:10 b May 05 08:56:11 c May 05 08:56:33 DocScrutinizer05, your files don't have spaces in their name May 05 08:56:50 Due to the nature of digital music, it's sort of possible for files to have spaces in their names :P May 05 08:56:57 ooh, so you got the other problem May 05 08:57:16 the you must use " " arounf the name May 05 08:57:21 around May 05 08:58:14 isn't that what I'm doing? May 05 08:58:46 well, no, you're doing exactly the opposite May 05 08:59:08 "a.m4a foo bar.m4a" May 05 09:01:03 hmm, so what's the correct way? May 05 09:02:16 jr@saturn:~> for y in x*; do echo $y; done May 05 09:02:17 x May 05 09:02:19 x 1 May 05 09:02:20 x 2 May 05 09:02:22 x 3 May 05 09:03:21 DocScrutinizer05, echo takes spaces May 05 09:03:26 do something else May 05 09:03:55 like cat for example May 05 09:04:12 jr@saturn:~> for y in x*; do ls -l "$y"; done May 05 09:04:13 -rw-r--r-- 1 jr users 40 4. Mai 03:00 x May 05 09:04:15 -rw-r--r-- 1 jr users 0 5. Mai 11:01 x 1 May 05 09:04:16 -rw-r--r-- 1 jr users 0 5. Mai 11:01 x 2 May 05 09:04:18 -rw-r--r-- 1 jr users 0 5. Mai 11:01 x 3 May 05 09:04:59 :-) May 05 09:06:16 still doesn't work for me :( May 05 09:06:21 for x in `ls *.m4a.mp3`; do May 05 09:06:21 t=`echo "$x" | sed 's/\.m4a.mp3$/.mp3/'`; May 05 09:06:21 echo "moved \"$x\" -> \"$t\"" May 05 09:06:21 done May 05 09:06:22 duh! May 05 09:06:33 no fucking `ls *` May 05 09:06:38 ah ok May 05 09:06:40 :P May 05 09:06:52 ooooh shiny May 05 09:07:38 when bash does the expanding, bash knows about the spaces in that token May 05 09:07:57 with `ls *` it has no way to know May 05 09:09:57 now to figure out what kind of m3u files my dad's car takes May 05 09:10:22 DocScrutinizer05, I totally forgot about * working without a command May 05 09:10:25 e.g ls May 05 09:11:01 yeah, the main difference between a decent unix shell and a fake like dos, where every command is doing that on its own May 05 09:11:42 actually `ls` is the same like `echo *` May 05 09:12:10 basically May 05 09:46:42 Hi here! May 05 10:15:34 Hi all May 05 10:17:19 i am using the default program fot chat on n900 May 05 10:17:48 It is pretty cool May 05 10:26:11 But i would know how to get my provider SIM settings on n900? May 05 10:31:12 i read around for google May 05 10:33:14 no possible May 05 10:33:14 Uff May 05 10:45:00 DocScrutinizer: infobot joined! May 05 10:46:31 ~+status May 05 10:46:32 Since Sun May 5 10:38:28 2013, there have been 0 modifications, 0 questions, 0 dunnos, 0 morons and 0 commands. I have been awake for 8m 3s this session, and currently reference 119044 factoids. I'm using about 18636 kB of memory. With 0 active forks. Process time user/system 6.46/0.14 child 0.01/0 May 05 10:46:48 o.O May 05 11:38:27 Oorgle? May 05 13:01:07 MohammadAG: anyway filenames with spaces are a pita in unix, and I strongly suggest to not even allow them anywhere. When importing e.g. mp3 then just convert all spaces to underlines May 05 13:15:06 filenames with spaces are a PITA if you're using inferior tools May 05 13:15:12 or using them wrong May 05 13:23:41 A splendid good Sunday. May 05 13:36:44 kerio: on linux about every (cmdline) tool is "inferior" when it comes to handling filenames with spaces May 05 13:57:06 2 May 05 14:17:18 DocScrutinizer05: Do you have any example? May 05 14:17:50 Actually particularly Linux (i.e. GNU) tools work quite well with filenames that even contain newline characters. May 05 14:24:28 Riviera: use find in a for x in `find ...` loop, with filenames that contain spaces May 05 14:24:53 have fun May 05 14:24:59 DocScrutinizer05: As kerio said, that's wrong usage. May 05 14:25:14 hahaha May 05 14:25:28 DocScrutinizer05: Splitting input into words and then being surprised that the input is split is not a convincing example. May 05 14:25:34 so what's "right" use then? May 05 14:25:50 DocScrutinizer05: Depends on what's available. You said Linux, so I assume GNU tools, like bash and GNU find: May 05 14:25:55 find $path -$filters -exec May 05 14:26:04 meh May 05 14:26:11 DocScrutinizer05: while IFS= read -r -d '' x; do some_command "$x"; done < <(find .. -print0) May 05 14:26:11 or find $path -$filters -print0 | xargs -0 May 05 14:26:19 I'm smart enough to know about -exec May 05 14:26:30 even about -print0 May 05 14:26:45 DocScrutinizer05: That'll work not only with paths containing spaces but also with newlines, and, in fact, any characters. May 05 14:26:50 but obviously for x in list, it's fucked up May 05 14:26:57 As -exec and | xargs -0 would as well, but you wanted a loop, so there you are. May 05 14:27:07 Well certainly, but that's expected. May 05 14:28:09 the point is that for x actually works just fine May 05 14:28:22 it's the $( find ) that fucks up stuff May 05 14:28:37 You can make it work for find output that doesn't contain paths with newlines with: IFS=$'\n'; set -f; for blah in $(find); do ..; done May 05 14:28:46 for x in "a b" "c d" "e f" works like a charm May 05 14:28:53 Sure. May 05 14:29:31 But $() isn't a good choice anyway, because you would have to use it unquoted, hence word-splitting and pathname expansion happen. Also $() removes trailing newline characters. May 05 14:29:33 any shell trick except using NUL as a separator will eventually fail May 05 14:29:39 I tried with IFS=, and IFS=: and it blew chunks on "do" unexpected May 05 14:30:04 Well, as kerio said, the tools work just fine if you don't use them incorrectly. May 05 14:30:22 ooh, kerio said that? May 05 14:30:25 hah! May 05 14:30:26 So a legitimate blame would be things were too complicated. May 05 14:30:46 Why do you laugh that much? You obviously are too clueless for this level of arrogance. May 05 14:31:18 a legitimate blame would be that anybody using blanks, comma, backspace, esc, exclamation mark, etc, in a filename should get shot with hot owlshit May 05 14:31:32 except that they're perfectly valid characters to use in a path name May 05 14:31:59 well, you don't use characters in path names, you use bytes May 05 14:32:02 even esc ans backspace? May 05 14:32:18 Yes, every character except \0 and, well /. May 05 14:32:23 i think that the only two invalid bytes are NUL and '/' May 05 14:32:29 my point stands May 05 14:32:34 hot owl shit May 05 14:32:39 oh, absolutely May 05 15:03:03 you can also make eth0:0 style aliases that have escape codes or backspaces in them with ifconfig :) May 05 15:23:50 Hello, how can I use all common commands of irc by the n900? May 05 15:24:16 Such /ctcp May 05 15:37:23 what client are you using? May 05 15:37:33 if you use irssi on it then it works just the same May 05 15:37:59 Well now here is default chat client of n900 May 05 15:38:24 But i have installed also irssi right now May 05 15:39:23 So i am fine now but i would switch tabs on irssi client May 05 15:39:52 Idk how to use it May 05 15:42:13 http://www.irssi.org/documentation/manual May 05 15:42:20 or you can just install xterm May 05 15:42:23 er May 05 15:42:24 xchat May 05 15:42:36 xchat = gui based client May 05 15:42:55 Yes I tried xchat May 05 15:43:09 It did not connect May 05 15:44:46 if it didn't connect it is a problem with whatever server you are using May 05 15:44:49 maybe the server is down May 05 15:44:56 or you have to send it something to connect because of no identd May 05 15:45:08 Nope anyway thx May 05 15:45:15 For the link May 05 15:45:16 k May 05 15:45:18 yeah May 05 15:45:27 irssi has a bit of a learning curve.. but once you do it it is worth it May 05 15:45:32 especially since you can use it on a shell May 05 15:45:33 heh May 05 15:45:38 which is what most people do May 05 15:46:11 I want just to use to connect to my eggdrop so i only need ctcp command available May 05 15:46:19 Nothing else May 05 15:46:30 Thx its enough for me May 05 16:15:50 >.< May 05 16:16:07 for crying out loud, stop using IRC to download warez May 05 16:16:10 it's a crappy method May 05 16:16:44 I dont May 05 17:56:22 how can I find a certain user in http://maemo.org/profile/list/? Sort: is missing "by user" I'd say... May 05 18:33:58 or am I missing something? May 05 20:34:16 i would honestly like to get a repligard backup from Nemein and compare or even merge it to our currnt repligard May 05 20:51:49 anyway, finding (out about) a GUID that's 'missing' and where it comes from, what type/record it has or should have in repligard, etc May 05 20:52:10 is probably the way forward May 05 20:53:35 eh ECHAN May 05 21:01:05 ~ECHAN **** ENDING LOGGING AT Mon May 06 02:59:58 2013