perl5 Number Sign # not working for comments - linux

I have a very strange problem..
perl5 Number Sign # not working correctly for comments..
We use emperl, mod_perl, apache, linux..
In some programs if I have a line commented out with a number sign # or just a number sign # by itself on a line, all of the code below that line doesn't work correctly.
There is a sysadmin so I don't have access or control over any of the settings on the server.
This is a new issue everything always worked previously.
So many possible area's that this might be coming from that I'm checking to see if anybody has run across this..
Any suggestions?

Found the issue:
Was transferring the files from LINUX to Windows to edit them.
If the file was originally created in Windows the end of a line was just a <CR> and for some reason the whole file wasn't running right. It mainly showed up when using the hash symbol for perl comments.
When I made sure the files had end of lines with <CR><LF>, this solved this issue.

Related

Saving Oracle SQL Developer script as a TEXT file (as in ascii... as in Notepad...)

New to Oracle...
I have a bunch of SQL scripts from SQL Server that I want to edit into Oracle. I load these notepad-capable ASCII text files (ex: myscript.sql) into SQL Developer. When I open it, SQL Developer adds an extra line break between every line I had in the ascii text file. Annoying, but I can deal with that. I soldier on. I edit and change syntax. I run it. It works. I save. I'm happy so far. Feeling good.
But...
Now when I try to open myscript.sql in Notepad, line breaks are gone... there is a blank between every character in a word... it's a mess.
What the heck happened? And how do I make it stop? I know I'm old school, but I like to edit the format of my scripts myself... I want them in ascii text so that I can use a bulk file editor to change things...
I have googled this for a couple hours and have found countless pages regarding saving the OUTPUT of a script as text, but nothing about saving a SQL Developer script as plain text.
Welcome to the world of UNIX vs Windows/DOS line ending differences.
I would recommend using a better editor than Notepad. A modern code editing program will automatically handle the conversion and display.
http://www.cs.toronto.edu/~krueger/csc209h/tut/line-endings.html
So I still don't know how a couple of my scripts got so mangled up, because I can't recreate the issue. Other scripts are editing and saving just fine.
But I did figure out how to fix the couple scripts that did get hosed up.
I loaded Notepad++ for Windows. I opened the offending script, which shows a bunch of [NUL] all over the place. I was able to use the Searce/Replace function in 'extended mode' to search for \x00 (aka null) and replace it with nothing.
Next was the annoyance with line breaks (new line) versus "carriage return plus new line". I was able to use extended search and replace to replace \n with \r\n .
This now got me a file that I could edit in 'regular' notepad. I still don't know where the extra line breaks came into play, but I was able to spin through the file and remove the extra blank lines.
So all is well with the universe again. I got my couple of mangled scripts back in order, and others seem to behave properly now.
Thanks to all for the help. This site has been invaluable to me.

Line 1 of txt files being ignored by delphi app, why?

I have a delphi prog that reads from thousands of .txt script files that I have created over some years. I had to do some mass changes so used a search and replace program which in itself took a good few hours! The problem is now the top line of all the txt files seems to be messed up somehow - to me it looks fine however the delphi program doesn't read it and TortoiseSVN records it as a changed line!!
What on earth has happened and how might I resolve it? So far I'm having to delete all the files and remake them. Deleting the line and rewriting doesn't work - even Crtl+A and pasting the old file contents doesn't work! Its as if the header is corrupt?
Could it be a problem with end lines? (windows/UNIX/Mac are different eg \n or \n\r ) use an editor able to show special characters. I think you can with tortoise diff, switching the right option. Else, try with notepad++, for example

Why does komodo edit require a duplicate .py file to execute my commands?

I am using Komodo edit 7.1 on a macbook pro running OS X mountain lion
Note that the duplicated file needs a space at the beginning. e.g:
to execute hello-world.py, I wrote the code given in the lesson but when running the command i get an error
/bin/sh: /usr/bin/pythonhello-world.py: No such file or directory.
When I create a file name: _hello-world.py (the underscore is actually white space) and execute it from there, the command completes the action correctly
'/usr/bin/python hello-world.py' returned 0.
Interestingly enough, the code for the duplicated file can be blank, somehow it is choosing the proper file.
p.s. obviously I am brand new at this. I have searched google for similar problems but haven't found what I need. Please help!
Thank you
The path to the python executable is not setup correctly. Use the Terminal to fix it.

Find: Parameter format not correct

I keep hearing this is a path issue with cygwin. It is prevent emacs from working within my cygwin. When I execute find on the cli (not bash/cygwin) I get the same error not matter what I type. I've read this is a problem with path creation within cygwin and that it should be prepending itself to the path. As you can see it is doing that.
Here is my /etc/profile
PATH=/usr/local/bin:/usr/bin:/bin:$PATH
export PATH
Problem is that as everyone else stated, emacs is using find.exe provided by windows. To change this, you need to change your %userprofile%.emacs file.
As nobody else states (even faq!), this file is not created automatically anymore. Go into Options > Save options the mini-buffer (one line at the bottom of emacs) will tell you where the file is being written to.
Go in there and add this line (You've installed cygwin at c:\cygwin, right?):
(setq find-program "C:\\cygwin\\bin\\find.exe")
You may need to restart Emacs for this to take effect.
Just add this line to you .profile
alias find='/cygdrive/c/cygwin/bin/find.exe'
Oddly-enough, I needed to use
(setq find-program "/bin/find.exe")
instead.
But thanks for the suggestion Drew.
Adding a setq find-program [msys2 or git path] in my init file, as suggested (I tried different forms), didn't work for me. "C:\Windows\System32\find.exe" is first in the path if I type where find in eshell and I didn't find how to remove it, only how to add others, which doesn't solve the problem.
So I share here the more radical, but working (also in Powershell), solution I used: replacing the find.exe in "C:\Windows\System32" with the one from "C:\msys64\usr\bin". I kept the old file in case, but so far so good. You need to change the permissions for this operation (see here how to gain full control, but I suggest only applying this to the file, not the whole folder, and putting things back after ;)).

How to configure the filename length that can be handled by Linux Ubuntu?

Im using Liferay portal server on tomcat and Linux Ubuntu.
Liferay is generating a file that is very long. I've seen those files in windows and its working. But when i tried running it in ubuntu, it doesn't create the file and my server is giving me error. I've also tried to make a file with a very long filename and it really doesn't allow me.
Is there a way for Linux Ubuntu to allow me to do this?
Fix this...
The source of my problem is the encrypted home of my ubuntu OS. It seems that the filename of the file created is also encrypted making my long filename even longer.
When i made a new installation of my Ubuntu, i didn't encrypt my home anymore and it works fine now.. thanks a lot all...
There's a huge slew of reasons it may not be working, probably the least of which is a long file name (unless we're talking about a filename over 255 characters, which I believe is the hard-limit).
Also, file length isn't going to be a big problem unless you've got some truly enormous files (sometimes linux filesystems cap at 2GB, but I don't know what the behaviour is if you went over. You'd probably still see a 2GB file that just doesn't contain everything).
My knee-jerk reaction would be to say you're having a permissions problem where the user the server is running as (say, 'www' or 'www-data', or whatever) doesn't have permission to write in the folder its trying too.
The filename you have given as an example is fine:
kevin#latte:~/miscdev/j$ touch 'everything.jsp_Q_browserId=firefox&themeId=controlpanel&colorSchemeId=01&minifierType=js&minifierBundleId=javascript.everything.files&t=1249034302000'
kevin#latte:~/miscdev/j$ ls -l
total 0
-rw-r--r-- 1 kevin kevin 0 2009-07-30 17:07 everything.jsp_Q_browserId=firefox&themeId=controlpanel&colorSchemeId=01&minifierType=js&minifierBundleId=javascript.everything.files&t=1249034302000
I imagine the problem is that you are passing that filename to a shell un-escaped, and it is interpreting the & character. Put the filename in single-quotes, as I have in my example.
I had the same problem on my Ubuntu 9.10 machine and I think it really was caused by the home-directory encryption. Those "too long" filenames work fine outside my home.

Resources