Sponsored Content
Top Forums Shell Programming and Scripting Removing blank spaces, tab spaces from file Post 302342041 by NARESH1302 on Friday 7th of August 2009 09:25:23 AM
Old 08-07-2009
Thanks

Thank you very much, yes it's working fine now. ONe thing to note here-

In AIX if we manually edit a file to include tabspaces, then these cmd may not work fine. One alternate cmd I found-

sed 's/'"$(echo '\011')"'//g;s/ //g' file
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing blank spaces from a file?

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)
Discussion started by: dfs
4 Replies

2. Shell Programming and Scripting

Replace blank spaces by single tab, and right alignment

Folks, I am wondering if anyone solve this problem. What I want to know is, 1. Delete all white spaces including leading blank space in each line (e.g. line 2), and replace such spaces by single tab except leading blank space 2. Then, align all columns to the right. But, output white space... (1 Reply)
Discussion started by: Jae
1 Replies

3. UNIX for Dummies Questions & Answers

Removing blank spaces from text files in UNIX

Hello, 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): mean_geo mean_raw lat lon 0.000 0 -70.616 163.021 0.000 0 -70.620 163.073 0.000 ... (8 Replies)
Discussion started by: vtoniolo
8 Replies

4. Shell Programming and Scripting

removing blank spaces in a script

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

5. Shell Programming and Scripting

Help with removal of blank spaces in a file

Hello.. I have a text file. I want to remove all the blank spaces(except tab) from the file.. I tried using sed command as shown below sed 's/ //g' file1 But the problem with the above command is that it also eliminates 'tab' which is between the columns.. For example if the contents... (7 Replies)
Discussion started by: abk07
7 Replies

6. Solaris

Removing blank spaces

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)
Discussion started by: rogerben
6 Replies

7. Emergency UNIX and Linux Support

Removing ONLY UNIQUE blank spaces with sed?

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

8. Shell Programming and Scripting

Removing blank/white spaces and special characters

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)
Discussion started by: himanshu sood
6 Replies

9. UNIX for Advanced & Expert Users

Delete blank spaces and blank lines in a file

Hi Gurus, Somebody can say me how to delete blank spaces and blank lines in a file unix, please. Thank you for advanced. (10 Replies)
Discussion started by: systemoper
10 Replies

10. Shell Programming and Scripting

Removing tab spaces at the end of each line

I have a file which contains the data lines like below.I want to remove the tab spaces at the end of each line.I have tried with the command sed 's/\+$//' file.but it does not work.Can anyone help me on this? 15022 15022 15022 15022 15022 15022 15023 15023 15023 15023 15023 ... (16 Replies)
Discussion started by: am24
16 Replies
LATEXREVISE(1)						User Contributed Perl Documentation					    LATEXREVISE(1)

NAME
latexrevise - selectively remove markup and text from latexdiff output SYNOPSIS
latexrevise [ OPTIONS ] [ diff.tex ] > revised.tex DESCRIPTION
latexrevise reads a file "diff.tex" (output of latexdiff), and remove the markup commands. If no filename is given the input is read from standard input. The command can be used in ACCEPT, DECLINE, or SIMPLIFY mode, or can be used to remove user-defined latex commands from the input (see -c, -e, -m, and -n below). In ACCEPT mode, all appended text fragments (or preamble lines) are kept, and all discarded text fragments (or preamble lines) are deleted. In DECLINE mode, all discarded text fragments are kept, and all appended text fragments are deleted. If you wish to keep some changes, edit the diff.tex file in advance, and manually remove those tokens which would otherwise be deleted. Note that latexrevise only pays attention to the "DIFaddbegin", "DIFaddend", "DIFdelbegin", and "DIFdelend" tokens and corresponding FL varieties. All "DIFadd" and "DIFdel" commands (but not their contents) are simply deleted. The commands added by latexdiff to the preamble are also removed. In SIMPLIFY mode, "DIFaddbegin, DIFaddend, DIFdelbegin, DIFdelend" tokens and their corresponding "FL" varieties are kept but all other markup (e.g. "DIFadd" and <DIFdel>) is removed. The result will not in general be valid latex-code but it will be easier to read and edit in preparation for a subsequent run in ACCEPT or DECLINE mode. In SIMPLIFY mode the preamble is left unmodified. OPTIONS
-a or --accept Run in ACCEPT mode (delete all blocks marked by "DIFdelbegin" and "DIFdelend"). -d or --decline Run in DECLINE mode (delete all blocks marked by "DIFaddbegin" and "DIFaddend"). -s or --simplify Run in SIMPLIFY mode (Keep all "DIFaddbegin", "DIFaddend", "DIFdelbegin", "DIFdelend" tokens, but remove all other latexdiff markup from body). Note that the three mode options are mutually exclusive. If no mode option is given, latexrevise simply removes user annotations and markup according to the following four options. -c cmd or --comment=cmd Remove "cmd{...}" sequences. "cmd" is supposed to mark some explicit anotations which should be removed from the file before release. -e envir or --comment-environment=envir Remove explicit annotation environments from the text, i.e. remove egin{envir} ... end{envir} blocks. -m cmd or --markup=cmd Remove the markup command "cmd" but leave its argument, i.e. turn "cmd{abc}" into "abc". -n envir or --markup-environment=envir Similarly, remove "egin{envir}" and "end{envir}" commands but leave content of the environment in the text. -V or --verbose Verbose output -q or --no-warnings Do not warn users about "DIDadd{..}" or "DIFdel{..}" statements which should have been removed already. BUGS
The current version is a beta version which has not yet been extensively tested, but worked fine locally. Please send bug reports to tilmann@esc.cam.ac.uk. Include the serial number of latexrevise (from comments at the top of the source). If you come across latexdiff output which is not processed correctly by latexrevise please include the problem file as well as the old and new files on which it is based, ideally edited to only contain the offending passage as long as that still reproduces the problem. latexrevise gets confused by commented "egin{document}" or "end{document}" statements SEE ALSO
latexdiff PORTABILITY
latexrevise does not make use of external commands and thus should run on any platform supporting PERL v5 or higher. AUTHOR
Copyright (C) 2004 Frederik Tilmann This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 perl v5.14.2 2007-09-29 LATEXREVISE(1)
All times are GMT -4. The time now is 03:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy