General :: Remove Excess Whitespace From A Document?

May 31, 2011

I want to remove excess whitespace from the ends of lines in a document, but this code doesn't work:

Code:

$ cat input.txt | sed 's/[ ]*$//' > output.txt

Nor does:

Code:

cat input.txt | sed 's/^[ ]*//;s/[ ]*$//' > output.txt

What am I doing wrong and are there other ways of automatically removing excess whitespace from the ends of lines.

View 4 Replies


ADVERTISEMENT

General :: Find And Remove Duplicate Phrases In A Document ?

Mar 29, 2011

I would like to find a command which automatically finds and removes phrases which appear more than once in a text file. I still want to keep one of these phrases, but I only want to see one of them.

View 9 Replies View Related

General :: Use Cut Command To Limit "excess Text" From A File?

Feb 22, 2011

use cut command to limit "excess text" from a file?

View 2 Replies View Related

Ubuntu :: Remove Or Disable Document Viewer Safely From System?

Jun 1, 2011

Is it possible to safely remove Document Viewer from Ubuntu system? When I try to uninstall it using the Software Center it says that the Ubuntu Desktop system will go with it. Is there another, safer way?

View 3 Replies View Related

Ubuntu :: CPUs At 100% - Therefore Excess Fan Noise

Feb 20, 2011

My setup:
HP XW8200
2x 3600MHz Xeon CPUs
4GB RAM
Quadro FX3800 PCIe graphics
Dual boot Ubuntu 10.10 32bit (primary use) and XP (gaming use only)

The issue I have is that the CPUs seem to run at 100% constantly in Ubuntu meaning that the CPU fans are constantly at high. This makes the machine sound like a wind tunnel!

It is nice and quiet in XP.

I installed GKrellM monitor which is what is telling me about the 100% CPU useage.

Would using the 64bit Ubuntu make any difference? (dont really want to reinstall tbh)

View 1 Replies View Related

Programming :: Bash - Read File Without Whitespace?

Mar 14, 2011

I am struggling with Bash scripting at the moment (I can't seem how anyone can write scripts with this language!!!) I have a need at home to have a cron job execute daily to lookup my downloads.txt file, read each url (per line) and download content from that url. Then that entry needs to be removed (well I keep all urls in memory and clear the file afterwards). If an error occurred during the download process, then the url is written to a downloads.err file. I got all the above working except for properly reading the url from the text file without including newline characters. I am using the following to read:

while read url; do
--Do whatever here--
done < downloads.txt

How can I get it not to let the url variable have newline characters?

View 11 Replies View Related

Ubuntu :: Get Xsane To Scan A Document And Have It Display As A Full 8.5x11 Sized Document Instead Of Something Half That Size?

Mar 13, 2010

how to get xsane to scan a document and have it display as a full 8.5x11 sized document instead of something half that size? I've been trying and trying and can't seem to figure it out.

View 3 Replies View Related

OpenSUSE Network :: Document Is Referencing 10.2. Or A Document For Use With SLED?

Jul 6, 2010

Anyone have better documentation or an update to the this version of the file Tomcat HOWTO openSUSE as that document is referencing 10.2. Or a document for use with SLED.

View 3 Replies View Related

Ubuntu :: Error Line 1: Char 1 Whitespace Or Empty File

Jun 16, 2011

Greetings, I have installed a VMware host on Windows 7 64bit and followed with a 10.04LTS 64 bit guest install. Everything went smooth. I have used VMware before, but the other way around.. Linux host and Windows guest.

So this time I am installing the VMWare tools on the guest, ubuntu 10.04, but it seems to be failing. The vmware tools install ran fine the first time with no errors, but I was getting the follwoing error after logging into the Ubuntu guest afterwards.

Could Not Apply the Start Configuration for Monitors
Error Line 1: Char 1 Whitespace or empty file

So I re installed the VMware tools once again, but still the same.

I am hoping that someone here has come across this before and hs a workaround. I don't think the vmware tools was installed correctly.

View 1 Replies View Related

Server :: Bind9 Config Files: Leading Whitespace Requirements?

Apr 19, 2011

Is leading whitespace significant in bind9 config files? This reverse lookup file (/var/chroot/bind9/etc/bind/zones/rev.168.168.192.in-addr.arpa) did not work; /var/log/messages had "zone 168.168.192.in-addr.arpa/IN: has no NS records".Inserting 3 spaces before IN in the NS line fixed it:

Code:

; IP Address-to-Host DNS Pointers for the 192.168.168.0 subnet
@ IN SOA CW8vDS.localdomain. hostmaster.localdomain. (
2011041901 ; serial
8H ; refresh

[code]...

Reading the man pages and netsearching, I did not find anything about indentation requirements except for "This is usually indented for readability, but the indents are required syntactically" here.Although the above file works, named-checkconf reports an error in it:

Code:

root@CW8vDS:/var/chroot/bind9/etc/bind/zones# named-checkconf rev.168.168.192.in-addr.arpa
rev.168.168.192.in-addr.arpa:1: syntax error near ';'

but named initialisation does not log any errors or warnings in /var/log/messages when processing this file except "/etc/bind/zones/rev.168.168.192.in-addr.arpa:2: no TTL specified; using SOA MINTTL instead".

View 10 Replies View Related

Programming :: Write Regexp That Matches String That Begins With Whitespace Or Contains Newline?

Dec 10, 2010

How do I write a regexp that matches a string that begins with whitespace or contains a newline, but not necessarily both?

View 2 Replies View Related

General :: Apache Can't See Document Root

Feb 9, 2011

I have set up apache on Centos 5.5 and am struggling with vhosts set up.With the config I have set apache will correctly serve sites with a document root of

/var/www/html/home/myuser/public_html
but not /home/myuser/projects > ls -al
shows public_html and projects as having identical permissions (755)

View 11 Replies View Related

General :: Converting Word Document To TIFF?

Apr 26, 2011

I have a CentOS 5.6 box and was wondering if there are any tools for Linux that can convert a Microsoft Word document to a TIFF file?

View 2 Replies View Related

General :: Extract Images From Word Document?

May 23, 2011

Is there a (Linux) command-line tool to extract all the images from a MS Word document, (preferably one that could handle the .docx format)?

View 1 Replies View Related

General :: Open Office Document Conversion Uses 100% CPU

Sep 5, 2011

When I try to convert a word document using the ooextract python script from open office like

/usr/local/bin/ooextract.py myDocument.doc myDocument.pdf

the open office deamon (sOffice.bin) takes 100% CPU load forever.

We are using Open Office 2.6.3 on a virtual machine running debian squeeze 2.6.32-5-amd64

UPDATE:

We found out that this appears only with our test document, other documents can be converted without problem. But how can we find out what's wrong with our document. How can we enable traces/loggin o the sOffice.bin process?

View 1 Replies View Related

General :: Combining Multiple .xls Spreadsheets Into One Document?

Nov 7, 2010

I have multiple .xls documents that are formatted as such,

<?xml version="1.0"?>
<?mso-application Excel.Sheet?>

They are all given different filenames bob_smells.xls, nancy_smells_worse.xls etc. I was wondering using Linux (LUbuntu specifically), would it be possible to combine all of these worksheets into one document, with each of the seperate files becoming a tab / sheet within the one file (And the name reflecting the original name of the document)?

View 2 Replies View Related

General :: Convert Document From Size A4 To Letter

May 12, 2010

Want to format document from size A4 to letter.I need to format some documents from A4 to print on letter size paper. The documents are Word documents and pdf.

View 4 Replies View Related

General :: Apache Won't Redirect To New Document Root

Jun 20, 2011

I've set my document root directory in httpd.conf to the directory I want to serve files out of, and set Options to Indexes FollowSymLinks; I've saved the configuration file and restarted apache, yet when I direct my browser to the domain name that's seated there, I can't get at my index.html which exists there. It serves index.html when it exists in the natural document root.

View 8 Replies View Related

General :: Editing Document On Installation Path?

Aug 9, 2010

I'm installing some software on a RedHat based O/S and have the instruction to

- 'Edit the document document name on the installation path.'

How do I find what the installation path is for this document? Are all programs installed in the same basic place on Linux machines?

I have tried the 'locate' command and it is not found. I have tried (find / -name 'documentname') and get a whole bunch of output saying:

find: /lost+found: Permission denied
find: /proc/tty/driver: Permission denied
find: /proc/1/task/1/fd: Permission denied
find: /proc/1/fd: Permission denied

[Code]....

View 3 Replies View Related

General :: Open Office Document Must Run Under Win32

Dec 18, 2010

I wrote a short story about using computers using Open Office. I saved a copy to my usb drive. When I tried to open it again it was all garbled code. One line of text said: must run under Win32. I can't find Win32 and I cant read my story now. How do I run this thing in Win 32? What does that mean? Do I open Win32 first then Open Office. Or the other way around. Anybody out there know? eeepc900 xandros

View 14 Replies View Related

General :: Text Document Displays Only Symbols

Dec 7, 2010

When I try to open text file with mouse pad or kate write all I see is PK and in small letters HF over TF_. I have no idea how this happened. How do I get my text document back? Using XFCE4.6.1, mousepad and kate write for my journal. Properties says its a zip archive but I didn't do that. Anyway tried to unzip it and got:

Code:
PowerJustice may be a plain executable, not an archive
unzip: cannot find zipfile directory in one of PowerJustice or
PowerJustice.zip, and cannot find PowerJustice.ZIP, period.

View 6 Replies View Related

General :: Find Document Files And Copy Them To Another Directory?

Nov 7, 2010

This is a bit of a basic question but I'm trying to copy all .doc files I find in a directory and copy them to another directory.I know each command:

find -name '*.doc' .

and:

cp filename location

how can I combine the two commands?

View 3 Replies View Related

General :: Mac OS To Generate Pdf From A Document Without Additional Software To Install

Jan 4, 2011

I have seen how simple it is for Mac OS to generate pdf from a document without additional software to install. But I am looking for this functionality in Linux. One scenario, for example, if I have myDocument.txt that contain an article, how can I convert this into pdf? My next question is, assuming that myDocument.txt is a 3-paged document, will it generate a 3-page continuous pdf and not just 3 separate pdfs?
Any tools for linux that does this? (GUI is fine, but commandline is preferable)

View 6 Replies View Related

General :: Apache Virtual Host Document Root ?

Sep 9, 2009

I'm now configuring my web server to server different Virtual Hosts based on DNS name. Right now I store my files in /var/www per the default installation settings in Apache.

Questions:
I want to change the Document Root to /home/username/public_html/example1.dyndns.org for the second virtual server. What do the permissions need to be in order for Apache to read the files in this location? Would it be best to force Apache to run as this new username instead of www-data?

My Virtual host setup will look something like this

I want to change the DocumentRoot as I am running a chrooted ProFTPd server and want to be able to update webserver files via FTP. I am running Ubuntu 8.04 LTS Server (CLI only).

View 5 Replies View Related

General :: How To Transfer Word Processor Document To XP Desktop

Oct 12, 2010

I was given a Linux Asus eee PC 4G Netbook. I know nothing about Linux, but I know if I use it, I will create documents that I need to put on my PC for a permanent record. Also, can I transfer a document written in Word to my Linux Netbook. I know these are kind of stupid questions, but I was unable to find the answer after an hour of net surfing.

View 2 Replies View Related

General :: Reading Hindi Language Document From Terminal

Mar 8, 2011

I having Ubuntu 10.04 Lucid Lynx at Dell laptop. i want to read documents written in hindi language. I have a font called Mangla installed in open-office that helps to read these files. But if I open them in gedit or display them by using following command, I cannot open them in readable format:- cat Hindi.txt

[Output] ....

I want this file should also be readable to a executable file of (CMU's toolkit). I have installed several types of fonts such as lohit_hi.ttf. The system does seem to be recognizing this language.

View 14 Replies View Related

General :: Remote Downlevel Document On Windows Printer?

Jan 3, 2011

When printing from ubuntu (zorin) to a hp officejet 5610 on a windows 2003 server, via samba, all I get is a Remote downlevel document on the print queue and nothing gets printed

View 1 Replies View Related

General :: Convert A DjVu Document To PDF - Using Only Command Line Tools?

Jan 26, 2010

I've got some documents in DjVu which I'll like convert to PDF. Is there a way to do this using command line OSS tools?

View 2 Replies View Related

General :: Pdf Edit OR Docx Support - Structure Of The Document Goes Wrong

Feb 12, 2010

I was given a 41-page pdf document (+ .docx) with some text/tables/pictures. Upon some audit, just 2 sentences must be changed in the document.

1. When I open it with openoffice (.docx) - the structure of the document really goes wrong. The document is too long to edit it manually to make it look as it's supposed to look.

2. When I open it with softmaker office 2010 (beta!) it crashes every time.

3. Could I edit just the relevant pages of .docx, export them to pdf and REPLACE just the two pages in the pdf file? Or is there any other solution without involving Windows?

View 6 Replies View Related

General :: Create A Command In The Vim That Saves A Text Document And Also Compile It?

Feb 27, 2011

I would like to create a command in the vim that saves a text document and also compile it. Is it possible?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved