New answers tagged

0

I had to use: apt-get autoremove fonts-cantarell apt-get install fonts-cantarell (cursor changed back at this point) shutdown -r now After restart even the lock screen went from boxes back to what it should be.


1

startheader=$(head -1 sourcefile) endheader=$(tail -1 sourcefile) # above lines assume your sourcefile has two lines in it and # each line contains the starting header and ending header startlinenumber=$(grep -n "${startheader}" datafile|cut -d: -f1) endlinenumber=$(grep -n "${endheader}" datafile|cut -d: -f1) sed -n -e ...


3

You could try like this: awk 'NR==1{for (i=1;i<=NF;i++) a[i]=$i; next} {for (i=1;i<=NF;i++) {print $i > a[i]".txt"}}' infile On header line this saves the value of each field in an array then for the rest of the lines it prints each field to the corresponding filename.


1

This works with OS X's tr but not with GNU tr: tr '[:lower:]' '[:upper:]' This works with gawk but not with mawk or nawk (which is /usr/bin/awk in OS X): awk '{print toupper($0)}' Another option is to use GNU sed: sed 's/./\u&/g' In Bash 4.0 and later you can also use the ^^ parameter expansion: while IFS= read -r l;do printf %s\\n ...



Top 50 recent answers are included