From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id IFYINt+aBWSE2gAASxT56A (envelope-from ) for ; Mon, 06 Mar 2023 08:48:47 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qJTsNd+aBWS+JgAAauVa8A (envelope-from ) for ; Mon, 06 Mar 2023 08:48:47 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B877744CFB for ; Mon, 6 Mar 2023 08:48:47 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZ5Zd-0003Qo-A3; Mon, 06 Mar 2023 02:47:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZ5ZV-0003Oe-HH for emacs-orgmode@gnu.org; Mon, 06 Mar 2023 02:47:51 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZ5ZT-0003Re-Jt for emacs-orgmode@gnu.org; Mon, 06 Mar 2023 02:47:49 -0500 Received: by mail-ed1-x529.google.com with SMTP id j11so15156825edq.4 for ; Sun, 05 Mar 2023 23:47:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ANGUvxwx9uHiRGVZWkLhOLV41KBuAC+40C6P47lWLRs=; b=jRYd2oc1HcyomHavmGags0qJoMG9oz+QLunxTeSNBkVvcV9+mlAwYg/kMuB3NjdCRf QH6AQy2pOgpeVaguvLN34Ged2cX5IUqjLbEJNsns/yMRHORgG01bV/qYXjzFSFskX4Pa AlxyPlcTa/vap2RWuTKBvtVXvkwPKzdU10JAYE4Ol3M++zU5uoFZeRgfj5zEr17f2vhT RHotW+no51UQXKvlRTb/lCN8ZA6xzVGlxjUNjZPvL5OIfVNNAFaZPD4yAWGgIcaAKuzF +Fc6pJR388L2gN/7vcLnyBDosST49+ChcFrbjrLDGBe5hF47KMYq54yt6D3gv038uUXd tdLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ANGUvxwx9uHiRGVZWkLhOLV41KBuAC+40C6P47lWLRs=; b=290uG/uexBLOG1D3TnXe8J89YM72IQjJFH5/LvziEHkIcKhC/JwV52JlaewC4NKt+o vWEifO/Is6pReQhs3WBfCeuC5bM1MPtOGicKfXBPstL4LMaZvDbreFo8R4xVU/5/hHeR dY9KpY5vPBHhbWv0YudNFMSCK12a3grJs7fIdnb6ZYsXWEFLSiAFnVZk5EPOAvPuBiHI 2whTbwPzl8clyvA+ZMxlMMkph3eQzh7pjll9yAiZJwJBov7UDvjqECA2emw3WbYife5z HP9DeD9m1befC5Jq9JD7X7VtOE3MTdo3ZITnHx9fcaGwT35iZZ1YRnri/5ffDbDBZ/jD hwQQ== X-Gm-Message-State: AO0yUKVH682xFYcz0aWTSZ7nxg+GbA1BpOoTiCt/ZORhyeQDlyuarTEg hLDm/NnCC2Amhykw63SnGF0= X-Google-Smtp-Source: AK7set86tb3PSZqb2goN0NUT2tafI8uTm4bnU6GGN9MUyoxWaMVe1BgOAGaBB2iNLr7FZd/Uzt3TDQ== X-Received: by 2002:a05:6402:510:b0:4bb:83fa:5e83 with SMTP id m16-20020a056402051000b004bb83fa5e83mr8906877edv.12.1678088865620; Sun, 05 Mar 2023 23:47:45 -0800 (PST) Received: from flexignu ([2a02:908:1d5:3c20:5f94:930e:439a:d5ef]) by smtp.gmail.com with ESMTPSA id u15-20020a1709064acf00b0090766deae98sm4139686ejt.166.2023.03.05.23.47.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Mar 2023 23:47:45 -0800 (PST) From: Jeremie Juste To: Ihor Radchenko Cc: emacs-orgmode@gnu.org, tyler@plantarum.ca Subject: Re: [FR] ob-awk.el specifying a delimeter argument in for output References: <87ttyzcyrp.fsf@gmail.com> <87bkl7z84p.fsf@localhost> <877cvus55d.fsf@gmail.com> Date: Mon, 06 Mar 2023 08:47:44 +0100 In-Reply-To: <877cvus55d.fsf@gmail.com> (Jeremie Juste's message of "Mon, 06 Mar 2023 08:36:14 +0100") Message-ID: <87zg8qqq1r.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=jeremiejuste@gmail.com; helo=mail-ed1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678088927; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ANGUvxwx9uHiRGVZWkLhOLV41KBuAC+40C6P47lWLRs=; b=aqxThB2kIpsy8VMNKirCFqkZQo8RT6ZKDAP2EXW3iOgQYjU0/LdVyNNgJM4Ji52LXSoIWB PhB18BVJwpa7YxWsxoUcBjQH97E0EAgeK5mTwIX3WxcmOd85V68u5lLLFUBDF3/JRPrqgd gDuxYeD8s+ZlNSgDfLnAVLsPw/6/fBhpx1QiddZZJjQ/hKQWqihR5znC9n7yiFzcMWMqZz SkiHaCmD5tJ1gQChEzsuQSElR8fjYD6sD22Ofija29QXuxz34u6lXyWaXOEdwGosTVAu9+ 0BQDEES8E+re1iKGlgW3P7Z7lRPa/hb0MHeos/zgLJogDab0gPgWmqYNGYTJkw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jRYd2oc1; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678088927; a=rsa-sha256; cv=none; b=O9LXsx1TugjFcEdlGtgUwCvJ8Vi6iADtWV9qeByk8CuZQcIBLMIDWwrIRHMgrxEaFaNUtd heVPHn0ML+UqpLJyDTeXHAXEpaVWdqDK5PUmEc84Nxjj/m9oDMZ5pgubII75qwaL7VWJBq 1RNgu6XI0Fkhiy2hMNctkTJg0D5GohjXSqu4SG1dsdAQteU6mbzEKMs3X5nFtgvGUdUOiv pJEb46pxvUcZ92LNsqyD2CMaUvL4tQju6KBVzNvE7R8Q0j7FzMcGWneiubqa/BQk9HcFSJ lFioKZknzOCkmuB7KBJnt986vfnLiktyfgPRVXp6KYBM47wQD6D1qVD/TzRe8g== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.44 X-Spam-Score: -6.44 X-Migadu-Queue-Id: B877744CFB Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jRYd2oc1; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com X-TUID: dFrPi1y13OUp Hello Ihor, >> I guess we might add an option to tell Org which separator to use when >> parsing output when :results table header argument is provided (see 16.6 >> Results of Evaluation section of Org manual). However, you can achieve >> the same now, using :post header argument, replacing the separators with >> something Org can understand. Thanks again for the suggestion, after giving your solution more thoughts, I could achieve the desired output. # file test.csv # 123;0;123 #+NAME: specific-delim #+BEGIN_SRC emacs-lisp :var tbl="" delim=";" (format "|%s" (replace-regexp-in-string delim "|" tbl)) #+end_src #+RESULTS: specific-delim : | #+begin_src awk :in-file test.csv :cmd-line -F ";" :post specific-delim(*this*,";") :results raw {print $0} #+end_src #+RESULTS: | 123 | 0 | 123 | Best regards, Jeremie