🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #7622

Re: calcular permisos de umask mediante bash ¿?

#7622
From: Fernando Arbeiza
Date: Sun, 02 Feb 2003 10:41
14 lines
1394 bytes
Hola:

On Sun, 2 Feb 2003 00:15:23 +0100, Javier Perez <javiperez78@yahoo.es> wrote:
> C�mo podr�a calcular los permisos que obtendr�n los ficheros
> (umask) mediante un script en bash (s�lo con bash.)?

Es un poco rebuscado:

printf "%04o\n" $((0666 & (~$(umask) & 0777)))

Un saludo.
-- 
Fernando Arbeiza        <URL: mailto:arbeizaf@ono.com>
Crea tu propio Linux:   <URL: http://www.escomposlinux.org/lfs-es>
Technical Details
Message-ID: <slrnb3pteq.1mp.arbeizaf@jupiter.olimpo>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!81-203-248-140.user.ono.COM!not-for-mail
References: <b1hkei$bvj$1@news.ya.com>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,2262509fd343e66e
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-02-02 02:56:06 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!81-203-248-140.user.ono.COM!not-for-mail
From: Fernando Arbeiza <arbeizaf@ono.com>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: calcular permisos de umask mediante bash
 ¿?
Date: Sun, 2 Feb 2003 11:41:30 +0100
Lines: 14
Message-ID: <slrnb3pteq.1mp.arbeizaf@jupiter.olimpo>
References: <b1hkei$bvj$1@news.ya.com>
NNTP-Posting-Host: 81-203-248-140.user.ono.com (81.203.248.140)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 1044183365 37707381 81.203.248.140 (16 [148301])
X-Orig-Path: jupiter.olimpo!news
User-Agent: slrn/0.9.7.4 (Linux)