Hot answers tagged osx
You can remove the first 12 lines with: tail -n +12 Some implementations of head like GNU head support: head -n -12 but that's not standard. tail -r file | tail -n +12 | tail -r would work on those systems that have tail -r (see also GNU tac) but is sub-optimal. Where n is 1: sed '$d' file You can also do: sed '$d' file | sed '$d' to remove 2 ...
You can use the following way to remove first N lines and last M lines. With N=5, M=7 and file test.txt: sed -n -e "6,$(($(wc -l < test.txt) - 7))p" test.txt The command prints all lines from N+1 to LastLine-M. Another option is to use python: python -c 'import sys;print "".join(sys.stdin.readlines()[5:-7]),' < test.txt
You are using the ~/Applications/ Folder and Not /Applications. Try: cd /Applications And then: ls ~ Means home, which is /Users/user/. There is a users Application folder but it is very rarely used and it is for Applications that are installed for only that certain user. All default Applications are in /Applications.
Only top voted, non community-wiki answers of a minimum length are eligible