posix   1716

« earlier    

history - Why is the xargs -i option deprecated? - Unix & Linux Stack Exchange | https://unix.stackexchange.com/
This makes me feel old, because I remember when 'xargs' *only* had '-i' and '-l', and this change feels completely arbitrary to me.
The -l and -i options appear in the 1997 version of the POSIX standard, but do not appear in the 2004 version of the standard. Therefore you should use -L and -I instead, respectively.
xargs  unix  shellscripting  posix  explained  solution 
7 days ago by kme
Rich’s sh (POSIX shell) tricks
This page is meant as a repository for useful tricks I’ve found (and some I’ve perhaps invented) for scripting the POSIX shell (with some attention to portability to non-conformant shells as well, scattered here and there). I am a strong believer that Bourne-derived languages are extremely bad, on the same order of badness as Perl, for programming, and consider programming sh for any purpose other than as a super-portable, lowest-common-denominator platform for build or bootstrap scripts and the like, as an extremely misguided endeavor. As such you won’t see me spending many words on extensions particular to ksh, Bash, or whatever other shells may be popular.
posix  shell 
16 days ago by jlecour
Fixing Unix/Linux/POSIX Filenames: Control Characters (such as Newline), Leading Dashes, and Other Problems
"In general, kernels should emphasize mechanism not policy. The problem is that currently there’s no mechanism for enforcing *any* policy[on filename characters]. Yet it’s often easy for someone to create filenames that trigger file-processing errors in others’ programs (including system programs), leading to foul-ups and exploits. Let administrators determine policies like which bytes must never occur in filenames, which bytes must not be prefixes, which bytes must not be suffixes, and whether or not to enforce UTF-8. "

Also note the top on how to 'rm' weird files: "rm ./-r" or "rm ./*"
PR: note section on "no leading/trailing space", for internal names or mapping to a filesystem
unix  linux  filesystems  shell  piperesearch  osdev  reference  posix 
16 days ago by mechazoidal
The #! magic, details about the shebang/hash-bang mechanism | https://www.in-ulm.de/
what's special about #!

#! was a great hack to make scripts look and feel like real executable binaries.

But, as a little summary, what's special about #!? (list mostly courtesy of David Korn)

- the interpretername must not contain blanks
- the length of the #! is much smaller than the maximum path length
- $PATH is not searched for the interpreter
- (apart from an absolute path, the #! line also accepts a relative path,
- and #!interpreter is equivalent to #!./interpreter,
- however, it's not of any practical use)
- the interpreter usually must no be a #! script again
- the handling of arguments in the #! line itself is varying
- the setuid mechanism may or may not be available for the script
- there's no way to express #!$SHELL

And why shebang? In music, '#' means sharp. So just shorten #! to sharp-bang. Or it might be derived from "shell bang". All this probably under the influence of the american slang idiom "the whole shebang" (everything, the works, everything involved in what is under consideration). See also the wiktionary, jargon dictionary or Merriam-Websters. Sometimes it's also called hash-bang, pound-bang, sha-bang/shabang, hash-exclam, or hash-pling (british, isn't it?).

According to Dennis M. Ritchie (email answer to Alex North-Keys) it seems it had no name originally.
And Doug McIllroy mentioned (TUHS mailing list), that the slang for # at Bell Labs most probably was "sharp" at the time.
bourne  bash  posix  shell  shebang  unix  linux  shellscripting  history  butwhy  explained 
4 weeks ago by kme
Utility Conventions (commandline utilities)
IEEE std 1003.1 -- Conventions for commandline utilities
commandline  posix  docopt  bash  python  software  ieee 
6 weeks ago by thcipriani
client9/shlib: portable functions for posix shell environments
portable functions for posix shell environments. Contribute to client9/shlib development by creating an account on GitHub.
type:library  lang:shell  posix  compliant  portable  function 
6 weeks ago by endorama

« earlier    

related tags

/bin/sh  2003  2004  2009  2011  2012  2013  2017  2018  32  64  acls  api  archived.version  arguments  article  asyncio  autoconf  awk  bash  bourne  browser  bsd  bsh  butwhy  c  c_lang  calton  cas  cas2018  case  cern  cheatsheet  cheatsheets  cifs  cli  colour  commandline  comparison  compatibility  compatible  compliant  computer-history  concurrency  concurrentprogramming  condition-variable  configuration  containers  conventions  cpp  cuda  cygwin  dash  date  datetime  developer  diagnostic  difference  directory  docker  docopt  documenation  documentation  dos  driver  echo  edge  editor  emacs  empty  example  explain  explained  exploits  faq  file  filepath  filesystem  filesystems  flags  floss  format  forumthread  free-software  fuchsia  function  fuse  gcc  github  glusterfs  gnu  go-lang  go  golang  gpfs  gui  hardware  haskell  history  howto  ibm  ieee  internals  io  issue  java  jinpeng  kernel  korn  ksh  kubernetes  lang:shell  laptop  library  links  linting  linux  macos  macosx  make  man  manuals  marfs  microkernel  modern  mpi  mutex  name  names  newbie  newline  node.js  object  oldversion  online  openfaas-the-hard-way  openfaas  openmp  opensource  optimization  os  osdev  osx  packagesystems  paper  parallel  path  pathname  performance  perl  phd  piperesearch  pipes  portability  portable  printing  process  programming  pthread  pu  python  quixotic  raidz  reddit  reference  regex  rum-kernel  rump  scripting  security  semaphore  serial  sh  shebang  shell  shells  shellscripting  signals  software  solaris  solution  spec  sql  sqlite  ssh-agent  ssh-forwarding  ssh  stackexchange  stackoverflow  standard  standards  stdlib  storage  strftime  strptime  styleguide  swift  syntastic  tab  terminal  testing  textui  things-i-learned-debugging  threads  time::piece  timekeeping  tips  tipsandtricks  tmux  tocttou  tools  tty  type:library  ubuntu  unikernel  unix  variable  vim  vm  vs.  warelogging  wei  wiki  win  windows  work  workaround  xargs  zfs  zsh 

Copy this bookmark:



description:


tags: