I am an super newbie, so forgive my sheer ignorance. I have a series of text files formatted as follows (just showing the header and first few lines):
I want to convert these to csvs with 4 columns (mean_geo, mean_raw, lat, and lon), so I'd like to replace all blank spaces with commas. Note that the length of the blank spaces is variable.
Is it possible to do this in Unix?
Thanks.
Last edited by radoulov; 05-04-2010 at 03:38 AM..
Reason: Please use code tags!
All...
I want to remove blank spaces in file . I just leraned that we can use
" cat <Input filename> | tr -s ‘ ‘ > <Target file name> "
i also know with SED we can replace a blank space by other character by
sed s/ /*/g filename.
Please let me know how can i do that by... (1 Reply)
Guys, I need some help... how can I remove the blank spaces between the lines below? (between the date and the hour fields)
21/05/07 00:05:00 99
21/05/07 00:10:01 99
21/05/07 00:15:00 99
21/05/07 00:20:00 99
21/05/07 00:25:00 99
I want to make the file... (4 Replies)
Hi,
I have this problem that there are blank spaces in my text file... i want to remove them
line 1
line 2
line 3
I want to remove the space between line 2 and line 3... I tried sed... it work but it prints the whole text file at the command prompt which i dont want....
sde i tried was... (4 Replies)
Hello All,
I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out.
My file is like this (<b> means one blank space, <t> means one tab space)-
$ cat file
NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Hi all,
Been trying to find a solution to this, I'm sure its a sed 1 liner, but I don't know sed well enough to work it out...
I have a text file in the following format:
431 666 1332 2665 0.24395
432 670 ... (3 Replies)
Hi I am writing a shell to run sqlplus scripts. i found a issue in my scripts that oracle will not spool a file if there is blank spaces in the word
like
/backup dir/scriptrelease/1_DDL
or
/backupdir/script release/2_DDL
can we write some thing in the shell to make "/backup dir" to... (1 Reply)
Hi ,
I want to go out of vi editor temporarily and execute a command in command prompt and again going back to the editor . Is it possible . Any help on this is really helpful.
1. Need to open vi
2. Temporarily come out and execute a command and go back to vi editor (6 Replies)
Hi, I have data that looks similar to this:
In which the sentences are written horizontally and the beginning of a sentence is indicated by a 1 in the first column and the number increments until the last item of the sentence. The end of the sentence and the beginning of the next is then indicate... (1 Reply)
Hello All ,
1. I am trying to do a task where I need to remove Blank spaces from my file , I am usingawk '{$1=$1}{print}' file>file1Input :-
;05/12/1990 ;31/03/2014 ;
Output:-
;05/12/1990 ;31/03/2014 ;This command is not removing all spaces from... (6 Replies)
Hi Guru,
I need some advice on how to add blank spaces to the code, rather than me just adding <space-bar spaces> which does not work.
Current output of the code
File System Backed Up - ALL_LOCAL_DRIVES
Daily - Incremental Backup Schedule - 1 Month Retention
• 7pm - PRD... (2 Replies)
Discussion started by: Junes
2 Replies
LEARN ABOUT DEBIAN
plan9-fmt
FMT(1) General Commands Manual FMT(1)NAME
fmt, htmlfmt - simple text formatters
SYNOPSIS
fmt [ option ... ] [ file ... ]
htmlfmt [ -a ] [ -c charset ] [ -u url ] [ file ... ]
DESCRIPTION
Fmt copies the given files (standard input by default) to its standard output, filling and indenting lines. The options are
-l n Output line length is n, including indent (default 70).
-w n A synonym for -l.
-i n Indent n spaces (default 0).
-j Do not join short lines: only fold long lines.
Empty lines and initial white space in input lines are preserved. Empty lines are inserted between input files.
Fmt is idempotent: it leaves already formatted text unchanged.
Htmlfmt performs a similar service, but accepts as input text formatted with HTML tags. It accepts fmt's -l and -w flags and also:
-a Normally htmlfmt suppresses the contents of form fields and anchors (URLs and image files); this flag causes it to print them, in
square brackets.
-c charset
change the default character set from iso-8859-1 to charset. This is the character set assumed if there isn't one specified by the
html itself in a <meta> directive.
-u url Use url as the base URL for the document when displaying anchors; sets -a.
SOURCE
/src/cmd/fmt.c
/src/cmd/htmlfmt
BUGS
Htmlfmt makes no attempt to render the two-dimensional geometry of tables; it just treats the table entries as plain, to-be-formatted text.
FMT(1)