From owner-freebsd-questions@freebsd.org Wed Mar 31 20:45:07 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE0375B0036 for ; Wed, 31 Mar 2021 20:45:07 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F9dc26zYqz4d5M for ; Wed, 31 Mar 2021 20:45:06 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: by mail-wr1-x436.google.com with SMTP id z2so20962154wrl.5 for ; Wed, 31 Mar 2021 13:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7LXsud/RcDtZbye4GC5DwOsRFxvz0+/Il7e4orSb3JM=; b=QSfsPFNNimlsZ4gNsmL0J6NPIkLt8z/mOqs7VOZJNThY4ghfUvoG7q9e8By3SklcfX njtW6uhwqbdr11kXVQegPIs/C8JzFvsBdlVOPZcjqKyuIdcJXxbOTte1toD3BZxeTeJJ 2AyM88SD5belybWuKK4ZnHYICVQ+cWMKhgdTOJ8jCqcUURjtfn7IXfhwzUxFsV7oXiIX wsv0ZzoWMmc6SEEO6qz6E4Ed3TMv7UvRnyT+jxR2J8EeNxkPilr368xB0QEdkA5L7Wu6 pO7BXo6rwe4zKPSOJzGhsffWClTvdB2tkcovfNUd8TzNbDTWYmNB+WJJZNluOfMAYDri lLPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7LXsud/RcDtZbye4GC5DwOsRFxvz0+/Il7e4orSb3JM=; b=gNLiCWUWVHnGSOsxpLuzjY58M/deABs8jp8QjkHK35/EfsJEMH2nbToPYuDL8pcSJu ZtdwciA8UGjOpfxKGzzIbPOp1x9oHP52rrkDBOX4zppOuxPOWua85nmnf8jBZj/r3gvb zS8bZ2JKDjS1JGGG9Luu+3b8oCLwDo+3t5NKS/0PwHNMy2E8PglrOK0hLCC8A22z26yf VNPqD7pm/9g+4s+fMy8uxKfT2FvxYMF8bH1QQMvJrfXecPbyT0RbUMN5ebuUoc+WyXrw WQC9K3CY/W++tC0Ggo0E2vvq04chPu9ZOSpNFUcIBstJuJXEF4n/Ps7UzA7/HUmHw1Hx 6k/Q== X-Gm-Message-State: AOAM531n/GkRTlhsKhpOBXgWHLq7zjOf/iS+nvb4bRP1jp9kpKrdmsEL NuJn+PmSU8uQulZDlZmWBGHCbjipdLbFC1rNyH4= X-Google-Smtp-Source: ABdhPJyE4AH/zkfwmrMAHLU5I14TB0/8F2B/Ap2vk03/OSUXfj64lxu3bdEv8zemMlTl1cBRtZBETsGdkVKZ9Aek9qU= X-Received: by 2002:a5d:644e:: with SMTP id d14mr4877614wrw.339.1617223505264; Wed, 31 Mar 2021 13:45:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Antonio Olivares Date: Wed, 31 Mar 2021 15:44:54 -0500 Message-ID: Subject: Re: an easter calculating script that uses dc, output does not stop To: Paul Procacci Cc: FreeBSD Questions Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4F9dc26zYqz4d5M X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=QSfsPFNN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of olivares14031@gmail.com designates 2a00:1450:4864:20::436 as permitted sender) smtp.mailfrom=olivares14031@gmail.com X-Spamd-Result: default: False [-3.80 / 15.00]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.80)[-0.803]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::436:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[0.0.0.24:email,0.0.0.25:email,0.0.0.31:email,0.0.0.21:email]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::436:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::436:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2021 20:45:07 -0000 On Wed, Mar 31, 2021 at 3:33 PM Paul Procacci wrote: > > It does not output continuously for me. > > # uname -a > FreeBSD nas.myhome 12.2-RELEASE-p4 FreeBSD 12.2-RELEASE-p4 r369444 GENERIC amd64 > > On Wed, Mar 31, 2021 at 4:30 PM Antonio Olivares wrote: >> >> Dear kind FreeBSD users, >> >> I found a script which I will attach inline. It uses dc *to do the >> math*, but the output runs indefinitely on FreeBSD machines. >> >> From >> https://forums.opensuse.org/showthread.php/435983-Easter-program >> >> <----- script follows -----> >> >> #!/bin/sh >> if test $# -lt 1 >> then >> echo usage: $0 year >> exit 1 >> fi >> echo $* '[ddsf[lfp[too early >> ]Pq]s@1583>@ >> ddd19%1+sg100/1+d3*4/12-sx8*5+25/5-sz5*4/lx-10-sdlg11*20+lz+lx-30% >> d[30+]s@0>@d[[1+]s@lg11<@]s@25=@d[1+]s@24=@se44le-d[30+]s@21>@dld+7%-7+ >> [March ]smd[31-[April ]sm]s@31<@psnlmPpsn1z>p]splpx' | dc | tr '\012' ' ' >> echo '' >> >> <----- end of script ------> >> >> I ran the script successfully during prior versions of FreeBSD, but it >> is now running infinitely( infinite loop). See run: >> >> ... >> to run we put >> $ sh easterdc.sh >> and the year >> olivares@deepcool:~/Downloads/kerTeX/Documents $ sh easterdc.sh >> usage: easterdc.sh year >> olivares@deepcool:~/Downloads/kerTeX/Documents $ sh easterdc.sh 2021 >> ........ >> 4 April April 4 April April 4 April April 4 April April 4 April >> April 4 April April 4 April April 4 April April 4 April April 4 >> April April 4 April April 4 April April 4 April April 4 April >> April 4 April April 4 April April ^C >> >> .... >> >> How can I fix this to just output 4 April and stop. Thanks in Advance. >> >> Regards, >> >> >> Antonio >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > > > -- > __________________ > > :(){ :|:& };: olivares@e154-1$ sh easterdc.sh usage: easterdc.sh year olivares@e154-1$ uname -a FreeBSD e154-1 12.2-RELEASE-p4 FreeBSD 12.2-RELEASE-p4 GENERIC amd64 olivares@e154-1$ sh easterdc.sh usage: easterdc.sh year olivares@e154-1$ sh easterdc.sh 2021 4 April 2021 olivares@e154-1$ On 13.0RC4 it goes infiintely :( Best Regards, Antonio