what the fuc>|?
December 13, 2005 8:52 AM
Subscribe
What does >| do in a shell script?
In the course of tracking down a video driver issue on a new install of Ubuntu Linux, I came across this
solution to the problem I was having, which involves making the following shell script run during init:
#!/bin/sh
# Fix wrong MTRR setting
echo "disable=0" >| /proc/mtrr
echo "base=0x0 size=0x40000000 type=write-back" >| /proc/mtrr
Initially I thought the >| construct must just be a typo for >, so I deleted the | - and found that the script failed, complaining about read-only filesystems. So I put both the >| things back in and it works.
In many years of shell scripting I have never seen this construct used or documented. What exactly does it do? And which manual says so?
posted by flabdablet to computers & internet (9 comments total)
As for where this is documented, try man bash.
posted by kindall at 9:03 AM on December 13, 2005