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


ADVERTISEMENT

Programming :: Programing - Reading File Line By Line Then Char By Char In Each Line

May 29, 2010

I've never programed shell scripting.

Code goes like so:

I simply want to read a file "data.txt" line by line Then char by char and add them into a result var. The file is supossed to always contain numeric values

View 8 Replies View Related

Programming :: SH: Remove Last Char If It Is An Empty Char In A String

Jul 5, 2011

With this I may remove the last emtpy char which is not visible, coming from net, windows, ...

Code:
echo "$mystringwindowsorotherwithemptylastchar" |sed s/.$//

However if there are not then it makes a problem and delete effectively an existing char.

Code:
echo "klklj" |sed s/.$//
klkl

Anyone would have a solution for SH?

View 2 Replies View Related

Programming :: Reading In A Outside Text File And Putting In The String On That Line Into A Char Array That Is Already Allocated?

Mar 29, 2011

Here is the issue. I am reading in a outside text file and putting in the string on that line into a char array that is already allocated.

Code:
int main(int argc, char *argv[])
{

[code]....

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

General :: Shell Scripting \ (test If A File Is Empty, If It Is Then Display "file Is Empty" Otherwise Display "file Is Not Empty")?

Oct 5, 2010

I am a final year student doign Computer systems engineering and just been introduced to linux. While still strugling to catch up with the commands, I am now given an assignment under shell scripting.I seriously am strugling to understand this question, can you please assist me.Here follows the assignment:

Operating Systems III
Some tips
e.g. (test if a file is empty, if it is then display "file is empty" otherwise display

[code]....

View 10 Replies View Related

Programming :: Error During Reading A File Line By Line In C?

Mar 6, 2010

I have a code over there. It reads a line from file and converts contents of it to double.

Code:
/*
* fileRead.c

[code]...

View 2 Replies View Related

General :: Append At A New Line If The Old Line Is Non Empty?

Feb 12, 2011

I want to append at a new line if the old line is non empty. so it would be something like

Code:

1
2
3//dont add here

Code:

1
2
3
//add here

but if sometimes there could be extra empty line, then add at the empty line. So the script needs to detect whether or not the last line is empty. i figured out the symbol for a new line pattern is ^ so it would probably be sed "a^stuff here"is this right? but i dont seem to get the right result

View 12 Replies View Related

General :: Bring Cursor To 1st Char In Current Line (Command Mode)

Dec 4, 2010

Just in case someone can reply a silly question, I've quite forgot the vi/vim command to bring the cursor to the 1st char in the current line. I do remember that for bringing it to EOL is '$'.

View 14 Replies View Related

Programming :: Fixing C++ Invalid Conversion From Const Char* To Char?

Mar 4, 2010

m getting the following error when trying to compile:Quote:

$ make
g++ -march=athlon64 -O2 -pipe -fomit-frame-pointer -msse3 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"undelete"' -DHAVE_SVDRP -I../../../include undelete.c

[code]...

View 14 Replies View Related

Programming :: Point A Char Pointer To A Part Of Another Char Array?

Nov 4, 2010

Programming in C.I have two char arrays.char buf1[1024];char buf2[1024];Aren't buf1 and buf2 also pointers?I read in 1024 bytes into buf1 which contain about 300 bytes of characters with newlines. The data is basically a few English sentences. I'm trying to scan buf1 for newlines and then stop at the 1st newline and copy the rest of the data from that 1st newline into buf2.So I run a for loop to look for that new line.

Code:
for(i=0; i<1024;i++) {
if((strcmp(&buf1[i], "

[code]...

View 8 Replies View Related

Programming :: C++ Invalid Conversion From Const Char* To Char*

Jul 9, 2010

I am having trouble with the following exception class.

Code:

/**Standard Exception
*
*@description
*@update
*@changes

[code]....

Line 43 points at the snprintf() command.I think the error has to do with the function being virtual and the const after the function definition, however although I have been looking really hard I have not being able to find the reason nor the solution to the problem.

One workaround that I know is moving the block of source withing the virtual function, in the constructor, however having read around (boost library exceptions tutorials) it specifically said that formating of errors messages should not take place withing the construction of objects because we are risking throwing an exceptions and messing up the flow order.

View 11 Replies View Related

Programming :: Char Variable Is Behaving As Unsigned Char?

Feb 14, 2011

i define variable of type char (range -128 to 127). when i tried to print the value after assigning a -ve value to it it displaying a +ve value of that -ve value(256+value).

View 3 Replies View Related

Ubuntu :: Error - Failed To Save File ImageMagick Returned Error Code 11 Command Line

May 1, 2010

simple scan error as follows: Failed to save file ImageMagick returned error code 11 Command line: convert -adjoin /tmp/simple-scan-DA9MBV.jpg /tmp/simple-scan-XCK4BV.jpg /tmp/simple-scan-NZVYBV.pdf Stdout: Stderr: using karmic note: I have apparmor extra profiles installed but didn't notice one that related to simple scan or imagemagick. Red herring or not?

View 6 Replies View Related

Programming :: Convert A Char * To Unsigned Char?

Mar 4, 2010

is it possible to convert a variable from char * to unsigned char ?

View 5 Replies View Related

General :: Find EOF Char In File?

Dec 10, 2010

How to find EOF char in file

View 1 Replies View Related

General :: Empty Bash Command Line?

Sep 28, 2010

I am looking for a way to delete the currently entered commandline without wasting seconds on the "Backspace"-key.

For example I scrolled the bash history and have a long commandline that would execute when I pressed ENTER:

~$ aptitude search openssl | grep dev

But now I decide that I do not want to execute this command. Can I get an empty prompt fast without deleting the whole line with Backspace? On the Windows "cmd" you can just press ESCAPE and it is gone. This behavior would be what I want.

The question may seem trivial but this is bothering me for a long time now.

View 2 Replies View Related

Ubuntu :: Error Dpkg: Parse Error, In File '/var/lib/dpkg/available' Near Line 2 Package 'x11proto-core-dev'

Sep 18, 2010

When I tried to upgrade my xubuntu 10.04 , I got this error

dpkg: parse error, in file '/var/lib/dpkg/available' near line 2 package 'x11proto-core-dev': value for `status' field not allowed in this context E: Sub-process /usr/bin/dpkg returned an error code (2)

View 5 Replies View Related

Programming :: How To Remove Alternate Char From File

Jan 19, 2010

How to remove alternate char from file using shell script? If the file content is "1234567890" the output file should be "24680".
sed 's/(.)(.)/2/g' filename
Now there may be small modification to generate two alternate byte, what it should be? If the file content is "1234567890" the output file should be "125689".

View 4 Replies View Related

General :: Error: Invalid Operands To Binary | (have Char * And ½char)

May 21, 2011

i have problem executing lex program though the code is correct i'm getting some errors and the error says: In function yylex:

error: invalid operands to binary | (have char * and char *)
error: invalid operands to binary | (have char * and char *)
error: expected ; before { token

View 3 Replies View Related

Ubuntu :: Error: Parsing File '/var/lib/dpkg/available' Near Line 7175

Jul 21, 2011

I tried to upgrade ubuntu , downloaded everything that was needed but I am not able to install anything.
It gives an error

Code:
Do you want to continue [Y/n]? y
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: warning: parsing file '/var/lib/dpkg/available' near line 7174 package 'python-egenix-mxdatetime':
missing description
dpkg: error: parsing file '/var/lib/dpkg/available' near line 7175:
field name `Package(' must be followed by colon

E: Sub-process /usr/bin/dpkg returned an error code (2) since then I am not able to install anything on my aptdaemon fails for anything that I try to install How to deal with it

View 3 Replies View Related

Fedora :: Vpnc Not Connecting / Error Can't Open /dev/net/tun, Check That It Is Either Device Char?

May 30, 2011

i need to install vpnc in amazon ec2 fedor 8 instance. i have installed with yum install vpnc commaned. And i have placed config file in /etc/vpnc/some.conf. but it is not connecting and giving the following error.
vpnc: can't open /dev/net/tun, check that it is either device char 10 200 or (with DevFS) a symlink to ../misc/net/tun (not misc/net/tun): No such device.

View 6 Replies View Related

Ubuntu :: ERROR 126 (HY000) At Line 1: Incorrect Key File For Table '/tmp/#sql_2506_0.MYI

Oct 30, 2010

Recordedseek became corrupted and couldn't be fixed no matter what I tried, so I went in, truncated the table and rebuilt it with mythcommflag. I also did some myisamchk repairs on a couple of other tables (settings and eit_cache). Now myisamchk tells me all the tables are fine. But when I restart the database I'll get an error like: ERROR 126 (HY000) at line 1: Incorrect key file for table '/tmp/#sql_2506_0.MYI'; try to repair it

In terms of the effect, I have lost all my recordings. Listings seems fine (although it has crashed a couple of times, I think I've fixed whatever was wrong), recording schedules seems fine, but even though there is stuff due to record upcoming recordings is empty. Mysqlcheck isn't showing any problems, I'm at a loss as to where to go from here.

View 2 Replies View Related

Programming :: Access A File Line By Line, And Check The Length Of Each Line.

Feb 13, 2011

I want to access a file, and check the length of every line.After, i want to check and replace all lines with length over 10 characters, with a message.Does anyone have a clue on that?

View 1 Replies View Related

Slackware :: /usr/bin/pgm2txt: Line 179: Syntax Error: Unexpected End Of File

Oct 4, 2010

I have compiled both gocr and subtitleripper from [URL] and I am running into a problem with one of the scripts run from subtitleripper: pgm2txt. The error is:

Code:

andrew@skamandros~/Desktop/Labyrinth/subtitles$ pgm2txt -f en fauno
/usr/bin/pgm2txt: line 165: unexpected EOF while looking for matching `"'
/usr/bin/pgm2txt: line 179: syntax error: unexpected end of file

Support for this program is not available and development has ceased a while ago so I have had a look at the script itself and I cannot see the error in syntax.

View 3 Replies View Related

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 View Related

OpenSUSE :: Empty The /tmp File Or Other File To Free Up Space?

Mar 23, 2010

I've noticed that when I run:

davek@linux-kw2x:~> df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 20641788 8427780 11165368 44% /
udev 961204 192 961012 1% /dev
/dev/sda3 217642344 4037944 202548468 2% /home
davek@linux-kw2x:~>

I have 44% used. It should be much smaller, under 10%. How do I empty the /tmp file or other file to free up space?

View 9 Replies View Related

General :: Jre - RHEL-5 / Getting Error Jre-6u16-x64-rpm.bin: Line 368: ./install.sfx.20520: Cannot Execute Binary File"?

Oct 22, 2009

I have installed RHEL-5 on a 64-bit machine recently, and want to install java. Earlier when I did "java -version", it showed jre1.4.0. But for my application , I need jre 1.5.0 or later, so I decided to download jre1.6. I am the root user here and I downloaded the jre1.6 as rpm.bin as well as simple .bin format.

But the problem is that when I tried executing any of them, I am getting below error message :

" ./jre-6u16-linux-x64-rpm.bin: line 368: ./install.sfx.20520: cannot execute binary file"
Moreover, now when I tried "java -version", it is not showing any thing.

Could anybody suggest me how can I resolve this deadlock situation, as I need to install my other application at the earliest.

View 9 Replies View Related

Networking :: Error: Can't Load Actions File '/etc/privoxy/match-all.action': Invalid Line (9): { +standard.Cautious }

Apr 26, 2011

Every time I try to set to standard.(cautious|medium|advanced) I get Apr 26 17:20:59.960 7f7faff15700 Fatal error: can't load actions file '/etc/privoxy/match-all.action': invalid line (9): { +standard.Cautious } /

or something similar. No additional help is available in the docs. So i try to use http://p.p (i.e. config.privoxy.org), and click on [URL]... expecting to get the three mode buttons. It just returns to p.p.

I already set the three edit vars to allow remote editing etc.So I looked in the top 15 Google hits for "Privoxy standard.Cautious". Apparently, nobody else knows how to do this either even tried launching firefox in root. but I'm getting kind-of frustrated with the writers/maintainers of Privoxy 3.

View 4 Replies View Related

General :: CRL File Error : PEM Routines:PEM_read_bio:no Start Line:pem_lib - Unable To Configure X.509 Storage For Certificate

Sep 10, 2010

I am configuring my Apache Server to enable checking CA Revocation List, and my Configuration lists as following :

Code:

SSLCARevocationFile /etc/httpd/confi.d/ssl.crt/CRL1.crl

But the server can not start, and the log says:

Code:

Unable to configure X.509 Storage for certificate

If I try this command to view content of my CRL file :

Code:

openssl crl -text -in CRL1.crl -noout

the console shows :

Code:

error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib:647:Expecting: X509 CRL

I think there is something wrong with my CRL file, such as the file format.Is there any requirement to the CRL file? What can I do to enable this CRL file checking?

View 2 Replies View Related







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