From owner-freebsd-questions@freebsd.org Sat Jan 6 16:09:38 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB88EEBFB0F for ; Sat, 6 Jan 2018 16:09:38 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1EF397470A for ; Sat, 6 Jan 2018 16:09:37 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.195.18.98]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.167]) with ESMTPA (Nemesis) id 0Lapqe-1fHt444Ahs-00kNle; Sat, 06 Jan 2018 17:03:53 +0100 Date: Sat, 6 Jan 2018 17:03:52 +0100 From: Polytropon To: Victor Sudakov Cc: Ultima , Polytropon , FreeBSD Mailing List Subject: Re: Convert .flac and .ape to mp3 Message-Id: <20180106170352.ce49b320.freebsd@edvax.de> In-Reply-To: <20180106150753.GA35605@admin.sibptus.transneft.ru> References: <20180104163421.GA15692@admin.sibptus.transneft.ru> <20180104175156.440fa0c2.freebsd@edvax.de> <20180106063934.GA32231@admin.sibptus.transneft.ru> <20180106085528.GA33117@admin.sibptus.transneft.ru> <20180106150753.GA35605@admin.sibptus.transneft.ru> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:DBtRe4p2Dm/yOPtFH1ec9M9VYxdX6yszvposQELFf7NRqaYZKNY qQVc07CAcdJnzSkWoOLnDrzRuGGIhsXxmFIdIGpcms0vnMbcjKiRGriKgVouPT4PgLojTzm tnts+8Spt3d9a6hoQ1u4aJX9O+VvtpEnrdeNMHapIB5yETX/0keJkcvicrUPamFWfCUsHu3 Z0uTcw0zOjVtHbHXvfYIA== X-UI-Out-Filterresults: notjunk:1;V01:K0:KTEpChUTjkg=:Oz5WAtaav5QatLTG/0v0e3 7DuGe7YHmHLYuyH3FuQ643oenaw5wYNsWO1Yrrl2MnTXKmXA6z3EZeSYbU62Z++MWkZMoDjC1 yV8givCz91cPbOoQD1HZ1J1Us8yIr46lA8q8HA0x0t0E9tCo0aEGcy0yH/tpZtiO/+wmpMrSk LqQtpl8Svpw/+80gSBk8IApYXGRTGE40iy7SMfwLPTkC03hlOwdm7inLPxMFvZ7xC3I/MBAWU Gm07igWZFzaMNetIXrjz5BJjurVBeRWBkltAce5GlRcW4fTgQJC9BPKuatVzoJ//Q55I34jm7 OlkJuP0tKkRNdbnMbt/d6j4O60s7WVi5H+FamNlsbKI9+cxiLd1fdXXdDWR6IK0nZf5/nWreo Itju0DYeIX/g5zCaI1L54qO4b2G1hLyGkxleAL70cpicUzeCmdn97Y0I3Fm76X2Js57Zz31wh LvDF+23r4wVz+fnLv6l0C5HnKuQluilGtRH2tl63/4bx+ZmnorHRUGYG7zDrUX4Nwk6vL/DR8 v42C6lsR1U7UmbjYXyNdDtKQ0T6JoDJzd2vJ3LhtOF4g99AnLh2vuaFg/Sl8FQxYjSM++4cLA LUGFCSEGQ4sVABdJn80vj611FKyJ8K2a3pRZD035i0EpWzliMTnYY8OnS7MQFPt1s3GTJeJbr p/DRevIwmVsCYf2pmIOmNp12j3g8njAzQ52YK2WHJxORpGSRLMT9do3ihja5TPaYei9sPJVhf xBVH9YjtTX0rMecSY14fP/C9g7/GSDS6DHheqsYFHSJ2c5HgT65hEcuA1NU= X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 16:09:38 -0000 On Sat, 6 Jan 2018 22:07:53 +0700, Victor Sudakov wrote: > Ultima wrote: > > Actually, that wont work either. I decided to go look at some of my scripts > > where I had to do something similar, the solution was setting IFS. > > > > IFS=$'\n' > > What's the dollar sign here for? Why not IFS='\n'? It can be seen as "evaluation symbol" (as known from $FOO being "FOO evaluated"), or "value of" ($FOO = the value of FOO). Another way (convenient, but doesn't look good" is to do something like this: IFS=" " This is a newline as well. In the case above, you want to set IFS to an _actual_ newline, not to \n. Remember _when_ the shell evaluates something: Variables like $IFS will be evaluated when being accessed, not when they are being declared (even with an initial value). The $'\n' makes sure that IFS will be assigned an actual (non-escaped) newline, so when constructs like for() or while read access $IFS, they find a "real" newline there. With the same idea in mind, you sometimes find things like this: IFS="`printf '\n'`" I think it becomes perfectly clear now: IFS is assigned the _result_ of _printing_ a \n. At least that's how my dusty brain seems to remember... ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...