<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Frequently Asked Questions About Linux / UNIX &#187; BASH Shell</title> <atom:link href="http://www.cyberciti.biz/faq/category/bash-shell/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Tue, 21 May 2013 21:38:37 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.5.1</generator> <item><title>Linux / Unix: View Overlapping Man Page With Same Names</title><link>http://www.cyberciti.biz/faq/linux-unix-view-man-pages-from-sections/</link> <comments>http://www.cyberciti.biz/faq/linux-unix-view-man-pages-from-sections/#comments</comments> <pubDate>Thu, 16 May 2013 19:06:02 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Commands]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[man command]]></category> <category><![CDATA[whatis command]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13275</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all UNIX related articles/faq" href="http://www.cyberciti.biz/faq/category/unix/"><img
src="http://s0.cyberciti.org/images/category/old/unix-logo.gif" alt="" border="0" /></a></div><span
class="drop_cap">I</span> am a new Unix / Linux user. I am using <kbd>whatis</kbd> command to find man pages. But, I noticed that some man pages have a common names. For example, when I run <kbd>whatis printf</kbd>:<br/> <small>Outputs:</small><br/> <kbd>printf (1) - format and print data
printf (1p) - write formatted output
printf (3) - formatted output conversion
printf (3p) - print formatted output
printf [builtins] (1) - bash built-in commands, see bash(1)</kbd><br/> How do I access overlapping man pages and what is the meaning of (1), (1p), (3), and so on?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/linux-unix-view-man-pages-from-sections/">Linux / Unix: View Overlapping Man Page With Same Names</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Linux / Unix: View Overlapping Man Page With Same Names&url=http://www.cyberciti.biz/faq/linux-unix-view-man-pages-from-sections/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/linux-unix-view-man-pages-from-sections/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/linux-unix-view-man-pages-from-sections/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>scp: Do not Overwrite Existing File On Linux or Unix System</title><link>http://www.cyberciti.biz/faq/unix-linux-scp-dont-overwrite-existing-file-command/</link> <comments>http://www.cyberciti.biz/faq/unix-linux-scp-dont-overwrite-existing-file-command/#comments</comments> <pubDate>Fri, 10 May 2013 20:03:49 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Commands]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[apple os x]]></category> <category><![CDATA[CentOS]]></category> <category><![CDATA[debian]]></category> <category><![CDATA[fedora]]></category> <category><![CDATA[FreeBSD]]></category> <category><![CDATA[NetBSD]]></category> <category><![CDATA[Openbsd]]></category> <category><![CDATA[rhel]]></category> <category><![CDATA[rsync command]]></category> <category><![CDATA[scp command]]></category> <category><![CDATA[ssh command]]></category> <category><![CDATA[ubuntu]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13266</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all Bash/Shell scripting related FAQ" href="http://www.cyberciti.biz/faq/category/bash-shell/"><img
src="http://s0.cyberciti.org/images/category/old/terminal.png" alt="" border="0" /></a></div><span
class="drop_cap">I</span> am a new Linux user. I use scp to upload files to net-storage provided CDN company. I do not want to overwrite the existing files. How can I prevent overwriting of files when using scp command under Linux, Mac OS X or Unix like operating systems?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/unix-linux-scp-dont-overwrite-existing-file-command/">scp: Do not Overwrite Existing File On Linux or Unix System</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=scp: Do not Overwrite Existing File On Linux or Unix System&url=http://www.cyberciti.biz/faq/unix-linux-scp-dont-overwrite-existing-file-command/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/unix-linux-scp-dont-overwrite-existing-file-command/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/unix-linux-scp-dont-overwrite-existing-file-command/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Linux / Unix: Find All Hidden Dot Directories and Delete</title><link>http://www.cyberciti.biz/faq/linux-unix-find-all-hidden-dot-directories-and-delete/</link> <comments>http://www.cyberciti.biz/faq/linux-unix-find-all-hidden-dot-directories-and-delete/#comments</comments> <pubDate>Sun, 05 May 2013 18:27:16 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[find commnd]]></category> <category><![CDATA[xargs command]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13257</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all Bash/Shell scripting related FAQ" href="http://www.cyberciti.biz/faq/category/bash-shell/"><img
src="http://s0.cyberciti.org/images/category/old/terminal.png" alt="" border="0" /></a></div><span
class="drop_cap">I</span> need to clean up my backups stored on the nas server. I need to free up the disk space. How do I find out all hidden dot directories such as <kbd>/nas01/backups/home/user/.gnome/</kbd>, <kbd>/nas01/backups/home/user/.gnome/</kbd> and so on and delete then in a single pass using Linux or Unix command line option? Please note that I do not want to delete nested hidden directories such as <kbd>/nas01/backups/home/user/data/.xml</kbd>, <kbd>/nas01/backups/home/user/foo/bar/.level/.levle2/</kbd> and so on.<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/linux-unix-find-all-hidden-dot-directories-and-delete/">Linux / Unix: Find All Hidden Dot Directories and Delete</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Linux / Unix: Find All Hidden Dot Directories and Delete&url=http://www.cyberciti.biz/faq/linux-unix-find-all-hidden-dot-directories-and-delete/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/linux-unix-find-all-hidden-dot-directories-and-delete/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/linux-unix-find-all-hidden-dot-directories-and-delete/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Linux / Unix: Dig Command Find Out TTL (Time to Live) Value For DNS Records</title><link>http://www.cyberciti.biz/faq/howto-use-dig-to-find-dns-time-to-live-ttl-values/</link> <comments>http://www.cyberciti.biz/faq/howto-use-dig-to-find-dns-time-to-live-ttl-values/#comments</comments> <pubDate>Sun, 05 May 2013 05:53:32 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[dig command]]></category> <category><![CDATA[dns lookup]]></category> <category><![CDATA[dns record]]></category> <category><![CDATA[dns server]]></category> <category><![CDATA[domain name system]]></category> <category><![CDATA[host command]]></category> <category><![CDATA[name resolution]]></category> <category><![CDATA[query status]]></category> <category><![CDATA[query time]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13254</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all UNIX related articles/faq" href="http://www.cyberciti.biz/faq/category/unix/"><img
src="http://s0.cyberciti.org/images/category/old/unix-logo.gif" alt="" border="0" /></a></div><span
class="drop_cap">I</span> would like to see the Time-to-live (TTL) value for a 'AAAA' and A record for domains. How do I see Time-to-live (TTL) for a DNS record under Unix or Linux operating systems using command line options?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/howto-use-dig-to-find-dns-time-to-live-ttl-values/">Linux / Unix: Dig Command Find Out TTL (Time to Live) Value For DNS Records</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Linux / Unix: Dig Command Find Out TTL (Time to Live) Value For DNS Records&url=http://www.cyberciti.biz/faq/howto-use-dig-to-find-dns-time-to-live-ttl-values/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/howto-use-dig-to-find-dns-time-to-live-ttl-values/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/howto-use-dig-to-find-dns-time-to-live-ttl-values/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Linux / Unix: Shell Remove Empty Lines</title><link>http://www.cyberciti.biz/faq/unix-linux-shell-remove-delete-empty-lines/</link> <comments>http://www.cyberciti.biz/faq/unix-linux-shell-remove-delete-empty-lines/#comments</comments> <pubDate>Wed, 24 Apr 2013 20:46:54 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[KSH Shell]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Perl]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[awk command]]></category> <category><![CDATA[sed command]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13235</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all UNIX related articles/faq" href="http://www.cyberciti.biz/faq/category/unix/"><img
src="http://s0.cyberciti.org/images/category/old/unix-logo.gif" alt="" border="0" /></a></div><span
class="drop_cap">I</span> am a new Linux user. I have text files with lots of empty lines. How do I delete all empty lines under Linux or Unix operating systems?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/unix-linux-shell-remove-delete-empty-lines/">Linux / Unix: Shell Remove Empty Lines</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Linux / Unix: Shell Remove Empty Lines&url=http://www.cyberciti.biz/faq/unix-linux-shell-remove-delete-empty-lines/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/unix-linux-shell-remove-delete-empty-lines/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/unix-linux-shell-remove-delete-empty-lines/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Bash: .* Considered Harmful To Match Dot Files. Why?</title><link>http://www.cyberciti.biz/faq/bash-considered-harmful-to-match-dot-files-why/</link> <comments>http://www.cyberciti.biz/faq/bash-considered-harmful-to-match-dot-files-why/#comments</comments> <pubDate>Wed, 24 Apr 2013 19:49:53 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Troubleshooting]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[chmod command]]></category> <category><![CDATA[chown command]]></category> <category><![CDATA[find command]]></category> <category><![CDATA[ls command]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13232</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all Bash/Shell scripting related FAQ" href="http://www.cyberciti.biz/faq/category/bash-shell/"><img
src="http://s0.cyberciti.org/images/category/old/terminal.png" alt="" border="0" /></a></div><span
class="drop_cap">H</span>ow do <a
href="http://www.cyberciti.biz/faq/bash-considered-harmful-to-match-dot-files-why/">I match dot files under Unix / Linux using bash</a> shell? Why <kbd>.*</kbd> considered as harmful when matching dot files under bash shell?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/bash-considered-harmful-to-match-dot-files-why/">Bash: .* Considered Harmful To Match Dot Files. Why?</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Bash: .* Considered Harmful To Match Dot Files. Why?&url=http://www.cyberciti.biz/faq/bash-considered-harmful-to-match-dot-files-why/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/bash-considered-harmful-to-match-dot-files-why/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/bash-considered-harmful-to-match-dot-files-why/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>HowTo: Unix rm All Files In a Directory</title><link>http://www.cyberciti.biz/faq/unix-rm-all-files-in-a-directory-command/</link> <comments>http://www.cyberciti.biz/faq/unix-rm-all-files-in-a-directory-command/#comments</comments> <pubDate>Wed, 24 Apr 2013 10:03:53 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[rm command]]></category> <category><![CDATA[YHBW]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13224</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all UNIX related articles/faq" href="http://www.cyberciti.biz/faq/category/unix/"><img
src="http://s0.cyberciti.org/images/category/old/unix-logo.gif" alt="" border="0" /></a></div><span
class="drop_cap">I</span> am a new Unix user. How do I rm (remove) all files in a directory called personal-files under Unix like operating systems?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/unix-rm-all-files-in-a-directory-command/">HowTo: Unix rm All Files In a Directory</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=HowTo: Unix rm All Files In a Directory&url=http://www.cyberciti.biz/faq/unix-rm-all-files-in-a-directory-command/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/unix-rm-all-files-in-a-directory-command/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/unix-rm-all-files-in-a-directory-command/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Bash Function: Find Number Of Arguments Passed</title><link>http://www.cyberciti.biz/faq/unix-linux-bash-function-number-of-arguments-passed/</link> <comments>http://www.cyberciti.biz/faq/unix-linux-bash-function-number-of-arguments-passed/#comments</comments> <pubDate>Wed, 24 Apr 2013 10:02:59 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[User defined functions]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13228</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all Bash/Shell scripting related FAQ" href="http://www.cyberciti.biz/faq/category/bash-shell/"><img
src="http://s0.cyberciti.org/images/category/old/terminal.png" alt="" border="0" /></a></div><span
class="drop_cap">H</span>ow do I find out number of arguments passed to my bash function called foo() under Unix like operating systems?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/unix-linux-bash-function-number-of-arguments-passed/">Bash Function: Find Number Of Arguments Passed</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Bash Function: Find Number Of Arguments Passed&url=http://www.cyberciti.biz/faq/unix-linux-bash-function-number-of-arguments-passed/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/unix-linux-bash-function-number-of-arguments-passed/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/unix-linux-bash-function-number-of-arguments-passed/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>HowTo: Check If a Directory Exists In a Shell Script</title><link>http://www.cyberciti.biz/faq/howto-check-if-a-directory-exists-in-a-bash-shellscript/</link> <comments>http://www.cyberciti.biz/faq/howto-check-if-a-directory-exists-in-a-bash-shellscript/#comments</comments> <pubDate>Sun, 14 Apr 2013 19:17:49 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[bash command]]></category> <category><![CDATA[test command]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13223</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all Bash/Shell scripting related FAQ" href="http://www.cyberciti.biz/faq/category/bash-shell/"><img
src="http://s0.cyberciti.org/images/category/old/terminal.png" alt="" border="0" /></a></div><span
class="drop_cap">H</span>ow do I check if a directory exists in a shell script under Linux or Unix like operating systems?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/howto-check-if-a-directory-exists-in-a-bash-shellscript/">HowTo: Check If a Directory Exists In a Shell Script</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=HowTo: Check If a Directory Exists In a Shell Script&url=http://www.cyberciti.biz/faq/howto-check-if-a-directory-exists-in-a-bash-shellscript/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/howto-check-if-a-directory-exists-in-a-bash-shellscript/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/howto-check-if-a-directory-exists-in-a-bash-shellscript/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>AWK: Remove All Blank Spaces From String / Field</title><link>http://www.cyberciti.biz/faq/unix-linux-awk-chop-remove-all-blank-space/</link> <comments>http://www.cyberciti.biz/faq/unix-linux-awk-chop-remove-all-blank-space/#comments</comments> <pubDate>Sun, 14 Apr 2013 18:14:54 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[awk command]]></category> <category><![CDATA[blank spaces]]></category> <category><![CDATA[white spaces]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13221</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all Bash/Shell scripting related FAQ" href="http://www.cyberciti.biz/faq/category/bash-shell/"><img
src="http://s0.cyberciti.org/images/category/old/terminal.png" alt="" border="0" /></a></div><span
class="drop_cap">I</span> need to parse the following text file: <kbd># example.net config
user = www30021
group = ftp30020
uid = 30021
gid = 30020
tmp_path = /netapp42/shared/www/images/host.example.com/tmp.bin
tmp_perms = defaults,nodev,nosuid,noexec
jail = on
location = /jails/apache/h/host.example.com/
sftp = on
ftps = off
php-cgi = on
perl-cgi = off</kbd> I need to find out value for each field and remove any blank spaces / white spaces from the field. How do I solve this problem using awk under Linux or Unix like operating systems?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/unix-linux-awk-chop-remove-all-blank-space/">AWK: Remove All Blank Spaces From String / Field</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=AWK: Remove All Blank Spaces From String / Field&url=http://www.cyberciti.biz/faq/unix-linux-awk-chop-remove-all-blank-space/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/unix-linux-awk-chop-remove-all-blank-space/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/unix-linux-awk-chop-remove-all-blank-space/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Linux / Unix Shell Script: Get The Current Directory</title><link>http://www.cyberciti.biz/faq/shell-script-get-current-directory/</link> <comments>http://www.cyberciti.biz/faq/shell-script-get-current-directory/#comments</comments> <pubDate>Tue, 09 Apr 2013 10:36:04 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[KSH Shell]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[pwd command]]></category> <category><![CDATA[PWD variable]]></category> <category><![CDATA[shell OLDPWD]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13211</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all Bash/Shell scripting related FAQ" href="http://www.cyberciti.biz/faq/category/bash-shell/"><img
src="http://s0.cyberciti.org/images/category/old/terminal.png" alt="" border="0" /></a></div><span
class="drop_cap">I</span> am working on a shell script. I need to find out the current working directory. How do I get the current working directory under Bash or Ksh shell running on Linux or Unix like operating systems?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/shell-script-get-current-directory/">Linux / Unix Shell Script: Get The Current Directory</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Linux / Unix Shell Script: Get The Current Directory&url=http://www.cyberciti.biz/faq/shell-script-get-current-directory/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/shell-script-get-current-directory/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/shell-script-get-current-directory/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Linux: Sort du -h (human-readable) Output By Size</title><link>http://www.cyberciti.biz/faq/how-do-i-sort-du-h-output-by-size-under-linux/</link> <comments>http://www.cyberciti.biz/faq/how-do-i-sort-du-h-output-by-size-under-linux/#comments</comments> <pubDate>Tue, 19 Mar 2013 20:09:54 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Debian / Ubuntu]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Ubuntu Linux]]></category> <category><![CDATA[du command]]></category> <category><![CDATA[head command]]></category> <category><![CDATA[human readable format]]></category> <category><![CDATA[numeric sort]]></category> <category><![CDATA[sort --human-numeric-sort]]></category> <category><![CDATA[sort command]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13200</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all GNU/Linux related FAQ" href="http://www.cyberciti.biz/faq/category/linux/"><img
src="http://s0.cyberciti.org/images/category/old/linux-logo.png" alt="" border="0" /></a></div><span
class="drop_cap">I</span> have a large number of files stored in ~/Downloads/ directory. How do I sort and print sizes in human readable format using <kbd>du -h</kbd> command under Ubuntu Linux LTS version 12.04 or any other Linux distributions?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/how-do-i-sort-du-h-output-by-size-under-linux/">Linux: Sort du -h (human-readable) Output By Size</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Linux: Sort du -h (human-readable) Output By Size&url=http://www.cyberciti.biz/faq/how-do-i-sort-du-h-output-by-size-under-linux/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/how-do-i-sort-du-h-output-by-size-under-linux/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/how-do-i-sort-du-h-output-by-size-under-linux/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Linux / Unix Bash Shell List All Builtin Commands</title><link>http://www.cyberciti.biz/faq/linux-unix-bash-shell-list-all-builtin-commands/</link> <comments>http://www.cyberciti.biz/faq/linux-unix-bash-shell-list-all-builtin-commands/#comments</comments> <pubDate>Tue, 19 Mar 2013 10:55:26 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[apple os x]]></category> <category><![CDATA[CentOS]]></category> <category><![CDATA[debian]]></category> <category><![CDATA[fedora]]></category> <category><![CDATA[FreeBSD]]></category> <category><![CDATA[help builtin]]></category> <category><![CDATA[help command]]></category> <category><![CDATA[NetBSD]]></category> <category><![CDATA[Openbsd]]></category> <category><![CDATA[rhel]]></category> <category><![CDATA[Scientific Linux]]></category> <category><![CDATA[type command]]></category> <category><![CDATA[ubuntu]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13194</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all Bash/Shell scripting related FAQ" href="http://www.cyberciti.biz/faq/category/bash-shell/"><img
src="http://s0.cyberciti.org/images/category/old/terminal.png" alt="" border="0" /></a></div><span
class="drop_cap">B</span>uiltin commands are contained within the bash shell itself. How do I list all bash builtin commands under Linux / Apple OS X / *BSD / Unix like operating systems without reading large bash man page?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/linux-unix-bash-shell-list-all-builtin-commands/">Linux / Unix Bash Shell List All Builtin Commands</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Linux / Unix Bash Shell List All Builtin Commands&url=http://www.cyberciti.biz/faq/linux-unix-bash-shell-list-all-builtin-commands/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/linux-unix-bash-shell-list-all-builtin-commands/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/linux-unix-bash-shell-list-all-builtin-commands/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Linux: Start Command In Background</title><link>http://www.cyberciti.biz/faq/linux-command-line-run-in-background/</link> <comments>http://www.cyberciti.biz/faq/linux-command-line-run-in-background/#comments</comments> <pubDate>Tue, 19 Mar 2013 10:18:29 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[FAQ]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[bg command]]></category> <category><![CDATA[CentOS]]></category> <category><![CDATA[debian]]></category> <category><![CDATA[fedora]]></category> <category><![CDATA[fg command]]></category> <category><![CDATA[kill command]]></category> <category><![CDATA[killall command]]></category> <category><![CDATA[rhel]]></category> <category><![CDATA[ubuntu]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13190</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all GNU/Linux related FAQ" href="http://www.cyberciti.biz/faq/category/linux/"><img
src="http://s0.cyberciti.org/images/category/old/linux-logo.png" alt="" border="0" /></a></div><span
class="drop_cap">I</span> am a new Linux command line user. How do I start or run command in the background so that I can access command prompt immediately?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/linux-command-line-run-in-background/">Linux: Start Command In Background</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Linux: Start Command In Background&url=http://www.cyberciti.biz/faq/linux-command-line-run-in-background/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/linux-command-line-run-in-background/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/linux-command-line-run-in-background/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>FreeBSD Laptop: Find Out Battery Life Status Command</title><link>http://www.cyberciti.biz/faq/freebsd-finding-out-battery-life-state-on-laptop/</link> <comments>http://www.cyberciti.biz/faq/freebsd-finding-out-battery-life-state-on-laptop/#comments</comments> <pubDate>Wed, 13 Mar 2013 15:50:18 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[FreeBSD]]></category> <category><![CDATA[apm command]]></category> <category><![CDATA[FreeBSD acpiconf battery command]]></category> <category><![CDATA[FreeBSD hwstat command]]></category> <category><![CDATA[pkg_add command]]></category> <category><![CDATA[sysctl command]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13187</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all FreeBSD related FAQ" href="http://www.cyberciti.biz/faq/category/freebsd/"><img
src="http://s0.cyberciti.org/images/category/old/freebsd_logo_sm.png" alt="" border="0" /></a></div><span
class="drop_cap">I</span> know <a
href="http://www.cyberciti.biz/faq/linux-laptop-battery-status-temperature/">how to find out battery life status using Linux</a> operating system. How do I monitor battery status on a laptop running FreeBSD version 9.x?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/freebsd-finding-out-battery-life-state-on-laptop/">FreeBSD Laptop: Find Out Battery Life Status Command</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=FreeBSD Laptop: Find Out Battery Life Status Command&url=http://www.cyberciti.biz/faq/freebsd-finding-out-battery-life-state-on-laptop/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/freebsd-finding-out-battery-life-state-on-laptop/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/freebsd-finding-out-battery-life-state-on-laptop/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>RHEL / CentOS: Install and Activate Bash Autocomplete Feature</title><link>http://www.cyberciti.biz/faq/fedora-redhat-scientific-linuxenable-bash-completion/</link> <comments>http://www.cyberciti.biz/faq/fedora-redhat-scientific-linuxenable-bash-completion/#comments</comments> <pubDate>Wed, 13 Mar 2013 10:49:10 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[CentOS]]></category> <category><![CDATA[RedHat and Friends]]></category> <category><![CDATA[autocomplete]]></category> <category><![CDATA[Fedora Linux]]></category> <category><![CDATA[Scientific Linux]]></category> <category><![CDATA[source command]]></category> <category><![CDATA[yum command]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13184</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all Sun CentOS Linux related FAQs" href="http://www.cyberciti.biz/faq/category/centos/"><img
src="http://s0.cyberciti.org/images/category/old/centos_logo.png" alt="" border="0" /></a></div><span
class="drop_cap">H</span>ow do I use bash auto complete features with various command on CentOS / RHEL / Fedora / Scientific Linux based systems?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/fedora-redhat-scientific-linuxenable-bash-completion/">RHEL / CentOS: Install and Activate Bash Autocomplete Feature</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=RHEL / CentOS: Install and Activate Bash Autocomplete Feature&url=http://www.cyberciti.biz/faq/fedora-redhat-scientific-linuxenable-bash-completion/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/fedora-redhat-scientific-linuxenable-bash-completion/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/fedora-redhat-scientific-linuxenable-bash-completion/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Linux / Unix: Read a Man Page From Local Directory</title><link>http://www.cyberciti.biz/faq/howto-read-file-as-manpage-with-man-command/</link> <comments>http://www.cyberciti.biz/faq/howto-read-file-as-manpage-with-man-command/#comments</comments> <pubDate>Sun, 10 Mar 2013 22:33:18 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[document processing]]></category> <category><![CDATA[export command]]></category> <category><![CDATA[gnu troff]]></category> <category><![CDATA[man command]]></category> <category><![CDATA[MANPATH variable]]></category> <category><![CDATA[nroff command]]></category> <category><![CDATA[typesetting package]]></category> <category><![CDATA[typesetting system]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13179</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all GNU/Linux related FAQ" href="http://www.cyberciti.biz/faq/category/linux/"><img
src="http://s0.cyberciti.org/images/category/old/linux-logo.png" alt="" border="0" /></a></div><span
class="drop_cap">I</span> have a man page stored in my home directory called ~/foo.1. How do I read a $HOME/foo.1 man page file? How can I read the file called ~/foo.1 as a manpage with man command?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/howto-read-file-as-manpage-with-man-command/">Linux / Unix: Read a Man Page From Local Directory</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Linux / Unix: Read a Man Page From Local Directory&url=http://www.cyberciti.biz/faq/howto-read-file-as-manpage-with-man-command/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/howto-read-file-as-manpage-with-man-command/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/howto-read-file-as-manpage-with-man-command/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Linux / Unix Find Command: Avoid Permission Denied Messages</title><link>http://www.cyberciti.biz/faq/bash-find-exclude-all-permission-denied-messages/</link> <comments>http://www.cyberciti.biz/faq/bash-find-exclude-all-permission-denied-messages/#comments</comments> <pubDate>Sun, 10 Mar 2013 09:37:07 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Troubleshooting]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[/dev/null]]></category> <category><![CDATA[apple os x]]></category> <category><![CDATA[CentOS]]></category> <category><![CDATA[debian]]></category> <category><![CDATA[error messages]]></category> <category><![CDATA[fedora]]></category> <category><![CDATA[find command]]></category> <category><![CDATA[FreeBSD]]></category> <category><![CDATA[NetBSD]]></category> <category><![CDATA[Openbsd]]></category> <category><![CDATA[rhel]]></category> <category><![CDATA[ubuntu]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13172</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all Bash/Shell scripting related FAQ" href="http://www.cyberciti.biz/faq/category/bash-shell/"><img
src="http://s0.cyberciti.org/images/category/old/terminal.png" alt="" border="0" /></a></div><span
class="drop_cap">W</span>hen I type <kbd>find . -type d -name "foo"</kbd> command I get Permission denied error messages. How do I exclude all "permission denied: messages from the find command under Linux or Unix like operating systems?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/bash-find-exclude-all-permission-denied-messages/">Linux / Unix Find Command: Avoid Permission Denied Messages</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Linux / Unix Find Command: Avoid Permission Denied Messages&url=http://www.cyberciti.biz/faq/bash-find-exclude-all-permission-denied-messages/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/bash-find-exclude-all-permission-denied-messages/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/bash-find-exclude-all-permission-denied-messages/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Bash Shell: Remove (Trim) White Spaces From String / Variable</title><link>http://www.cyberciti.biz/faq/bash-remove-whitespace-from-string/</link> <comments>http://www.cyberciti.biz/faq/bash-remove-whitespace-from-string/#comments</comments> <pubDate>Tue, 15 Jan 2013 23:44:19 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[awk command]]></category> <category><![CDATA[sed command]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13116</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all Bash/Shell scripting related FAQ" href="http://www.cyberciti.biz/faq/category/bash-shell/"><img
src="http://s0.cyberciti.org/images/category/old/terminal.png" alt="" border="0" /></a></div><span
class="drop_cap">I</span> have a bash variable as follows: <kbd>output="$(awk -F',' '/Name/ {print $9}' input.file)"</kbd> How do trim leading and trailing whitespace from bash variable called $output? How do I trim trailing whitespace from $output?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/bash-remove-whitespace-from-string/">Bash Shell: Remove (Trim) White Spaces From String / Variable</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Bash Shell: Remove (Trim) White Spaces From String / Variable&url=http://www.cyberciti.biz/faq/bash-remove-whitespace-from-string/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/bash-remove-whitespace-from-string/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/bash-remove-whitespace-from-string/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Linux: Find Out What Process Are Using Swap Space</title><link>http://www.cyberciti.biz/faq/linux-which-process-is-using-swap/</link> <comments>http://www.cyberciti.biz/faq/linux-which-process-is-using-swap/#comments</comments> <pubDate>Tue, 15 Jan 2013 19:59:19 +0000</pubDate> <dc:creator>nixCraft</dc:creator> <category><![CDATA[BASH Shell]]></category> <category><![CDATA[Debian / Ubuntu]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[RedHat and Friends]]></category> <category><![CDATA[awk command]]></category> <category><![CDATA[grep command]]></category> <category><![CDATA[memcached]]></category> <category><![CDATA[memory pages]]></category> <category><![CDATA[pgrep command]]></category> <category><![CDATA[pidof command]]></category> <category><![CDATA[smem command]]></category> <category><![CDATA[swap space]]></category> <category><![CDATA[top command]]></category> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=13113</guid> <description><![CDATA[<div
style="float:right;margin-top:0px;margin-left:5px;"><a
title="See all GNU/Linux related FAQ" href="http://www.cyberciti.biz/faq/category/linux/"><img
src="http://s0.cyberciti.org/images/category/old/linux-logo.png" alt="" border="0" /></a></div><span
class="drop_cap">T</span>he top and free command display the total amount of free and used physical and swap memory in the server. How do I determine which process is using swap space under Linux operating systems? How do I find out swap space usage of particular process such as <a
href="http://www.cyberciti.biz/faq/howto-install-memcached-under-rhel-fedora-centos/">memcached</a>?<p>Read answer to: "<strong><A
href="http://www.cyberciti.biz/faq/linux-which-process-is-using-swap/">Linux: Find Out What Process Are Using Swap Space</a></strong>"</p><p><a
title="Post to Twitter" href="http://twitter.com/share?related=nixcraft&text=Linux: Find Out What Process Are Using Swap Space&url=http://www.cyberciti.biz/faq/linux-which-process-is-using-swap/&via=nixcraft" target="_blank" border="0"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.tweet.png" alt="Tweet this" /></a> &nbsp;&nbsp;&nbsp;<a
title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=http://www.cyberciti.biz/faq/linux-which-process-is-using-swap/" target="_blank"><img
border="0" src="http://s0.cyberciti.org/images/misc/feed.fb.png" alt="Share on Facebook" /></a></p>]]></description> <wfw:commentRss>http://www.cyberciti.biz/faq/linux-which-process-is-using-swap/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>