≡ Menu

white spaces

AWK: Remove All Blank Spaces From String / Field

I need to parse the following text file:

# 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

Tutorial details
DifficultyEasy (rss)
Root privilegesNo
Estimated completion timeN/A
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?
[click to continue…]

How do I remove all (text, special characters, white spaces, tabs etc) from my text file (input) except numbers (digits) using sed command?
[click to continue…]

Bash Find All File Names With White Spaces

How do I find all files with one ore more blank space (while spaces) in their name under UNIX like operating systems?
[click to continue…]