Unix and Linux: Redirect Error Output To null Command

I ‘m a new Linux system user. How can I redirect command error output /dev/null on a Linux or Unix-like system using Bash shell?   Your shell comes with three file descriptors as follows: stdin…

sed Tip: Delete All Blank White Spaces

I have a text file as follows: foo bar foobar How can I delete all leading and/or trailing blank spaces, tab from each line using sed command?   You can use sed command to delete…

Mac OS X: Install GCC Compiler with Xcode

I have Mac OS X Mountain Lion. I need to compile a few apps and Perl modules. Then I already installed Xcode from app store but I’m unable to find gcc compiler or make command.…

Mac OS X: Wake Up Servers Using Wake-on-LAN ( WOL ) Command Utility

I know how to send WOL command using Linux or FreeBSD wake command. But, how do I send Wake on LAN (WOL) frames to hosts on a local Ethernet network using Apple OS X Unix…

Mac Os X: Find Out Wireless WI-Fi Connection Speed Rate

How do I see my current WI-FI (Wifi) connection speed in Apple Mac OS X?   WI-FI allows an electronic device such as Apple laptop, ipad, iPhone and other iDevices to exchange data or connect…

Awk Floating Point Number Addition Results Are Unexpected

I am using awk to grep ‘foo’ from a text file and cacluate sum of field # 7. But, result is rounded to an integer. I need exact result such as 385858.66 and not 385858…

Nginx Redirect Mobile / Smart Phone Traffic To Mobile Version Of the Web Site

I am a new nginx user and I would like to redirect all mobile / smart phone users from www.example.com to m.example.com domain. How do I detect a mobile phone browser in nginx? How do…

Unix: csh Shell Loop Example

C an you give me a simple loop example in csh shell in Linux or Unix like operating systems?   The C shell (csh) or the improved version, tcsh is a Unix shell that was…

FreeBSD 9.1: HowTo Load a Kernel Module

I am a new FreeBSD Unix users. I am using FreeBSD version 9.1 and how do I load a kernel module called drm using command line option?   You need to use the kldload command.…

Bash: Display Web Page Content In Terminal

H ow can I fetch HTML web page content from bash and display on screen using shell utilities?   You can use any one of the following tool or combination of all of them to…