AWK: Remove All Blank Spaces From String / Field

Posted on in Categories , , last updated April 14, 2013

I need to parse the following text file:

# config
user = www30021
group = ftp30020
uid = 30021
gid = 30020
tmp_path = /netapp42/shared/www/images/
tmp_perms = defaults,nodev,nosuid,noexec
jail = on
location = /jails/apache/h/
sftp = on
ftps = off
php-cgi = on
perl-cgi = off

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?

xargs: How To Control and Use Command Line Arguments

Posted on in Categories , , , , , , , , , , last updated September 2, 2010

I am trying to use xargs command using shell pipes and not able to understand how to control and use command line arguments. For example I’d like to find out all *.c file located in 100s of sub-directories and move them to another directory called ~/old.src. How do I use command line args with xargs to achieve the same?