Sponsored Content
Top Forums UNIX for Dummies Questions & Answers To remove the extra spaces in unix Post 302072567 by Sho on Thursday 4th of May 2006 05:43:24 AM
Old 05-04-2006
Thanks a lot.
But when I tried using the above nawk command, I got the followin error;
"nawk: empty regular expression
source line number 1
context is
{ gsub(/ >>> /,// <<< , $6); print }"

Not sure on what I m missing out.

Please do help me out. Thanks...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

To remove Continous blank spaces from a file in UNIX

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)
Discussion started by: arunkumar_mca
1 Replies

2. Shell Programming and Scripting

Remove extra spaces in a line

Hi, I need a help in deleting extra spaces in a text. I have a huge file, a part of it is :- 3 09/21/08 03:32:07 started undef mino Oracle nmx004.wwdc.numonyx.com Message Text : The Oracle session with the PID 1103 has a CPU time ... (6 Replies)
Discussion started by: vikas027
6 Replies

3. Shell Programming and Scripting

remove extra spaces between fields

Hi, I have a source file as mentioned below: I want to remove all the extra spaces between the fields. a b--------|sa df-------|3232---|3 sf sa------|afs sdf-----|43-----|33 a b c------|adfsa dsf---|23-32|23 *Here '-' idicates spaces Now, I want output as below: a b|sa df|3232|3... (7 Replies)
Discussion started by: srilaxmi
7 Replies

4. Shell Programming and Scripting

How to remove extra spaces from a string??

Hi, I have a string like this and i want to remove extra spaces that exists between the words. Here is the sentence. $string="The small DNA genome of hepadnaviruses is replicated by reverse transcription via an RNA intermediate. This RNA "pregenome" contains ... (2 Replies)
Discussion started by: vanitham
2 Replies

5. Shell Programming and Scripting

How to remove white spaces from the beginning an end of a string in unix?

Suppose, I have a variable var=" name is ". I want to remove the blank spaces from the begining and endonly, not from the entire string. So, that the variable/string looks like following var="name is". Please look after the issue. (3 Replies)
Discussion started by: mady135
3 Replies

6. Shell Programming and Scripting

How can I stop the unix script from trimming extra spaces?

I have a file which contains certain records about users. the row length is always fixed to 205 characters. Now I want to read each record line from the file, substring some portion out of it and put into another file. But I have observed that my script is trimming the extra spaces I have used for... (4 Replies)
Discussion started by: Pramit
4 Replies

7. Shell Programming and Scripting

Remove of extra spaces from the trailing

HI, I need the help from the experts like I have created one file with text like: a b c d e f g h i j k l So my question is that i have to write the script in which like in the first sentence it will take only one space after d and remove all the extra space in the end.I dont... (8 Replies)
Discussion started by: bhanudhingra
8 Replies

8. Shell Programming and Scripting

How to remove spaces between the columns in UNIX script?.

Hi guru's, I am trying to write a script to generate a csv file by connecting to database run a query and put the values into csv file. But the problem i face is i am getting lot of space after one value.how can i remove those values?. Please help. #!/bin/bash export... (2 Replies)
Discussion started by: karingulanagara
2 Replies

9. UNIX Desktop Questions & Answers

To remove the extra spaces at the end of each line in a file

I have a file of about 10k records and eace line is having an extra space of 5 byte at the end.. Iwant to remove the extra spaces at the end of each line.. Can someone please help me out.. I tried using sed command and its not working... can someone please help me out. (3 Replies)
Discussion started by: rammohan
3 Replies

10. UNIX for Beginners Questions & Answers

Remove line breaks and extra spaces

Hi, I want to remove all extra spaces, line breaks . Need a new line entry only for term starting"array" For eg: my input is array(), array(), array(), and my expected output is array(), array(), array(), Is it possible using awk? (5 Replies)
Discussion started by: rsi.245
5 Replies
FORMAT(1)						      General Commands Manual							 FORMAT(1)

NAME
format - format a PC floppy diskette SYNOPSIS
format [-v] device [media-size [drive-size]] DESCRIPTION
Format allows a user with read-write permission to device to format a floppy. Either one of the special floppy devices must be used, see fd(4), or an automatic device may be used with the size of the floppy specified on the command line. Two sizes must be given when format- ting a low density diskette in a high density drive. For example: format /dev/at1 format /dev/fd1 1200 format /dev/fd1 360 1200 The first two commands format a 1.2M diskette, the last formats a 360k diskette in a 1.2M drive. A 1.44M drive knows when it's dealing with a low density floppy, so all these commands format a 720k diskette: format /dev/fd0 720 format /dev/fd0 720 1440 format /dev/ps0 No sizes may be specified when using a special floppy device, a size must be specified when using an automatic device. OPTIONS
-v Verify the process by reading each track after formatting it. Formatting is normally blind, the controller has no idea whether it succeeds or not. Use -v on a new box of cheap diskettes, or on a diskette that may have gone bad. Verifying will increase format- ting time by 50%. SEE ALSO
mkfs(1), fd(4). DIAGNOSTICS
Numbers will be printed on standard output to show that it is busy. The locations of bad sectors are printed on standard error when veri- fying. The exit code is zero unless there are too many bad spots. AUTHOR
Kees J. Bot (kjb@cs.vu.nl) FORMAT(1)
All times are GMT -4. The time now is 10:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy