Problem with initialization environment files

I'm trying to get a .profile file to work in my login environment, but it just doesn't want to cooperate. I get errors on just about everything. In fact, the only thing I've been able to get to work is the echo command. It doesn't matter whether or not I use fully qualified paths for the commands or not. Here's a short list of some of the problems.
1. Blank lines generate the following error...
: command not found
2. pwd command generates the following error...
: command not found
3. /bin/ls command generates the following error...
: No such file or directory
4. Echoing the PATH environment variable actually works...
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
BTW, these commands work just fine from the command line. But if I manually run .profile, or have it run automatically when I launch a terminal window, these errors appear. I'm very familiar with command line interfaces as I've used a multitude of shells over the years in both Solaris and Linux environments. I just don't get what's going on with the Mac. Searching with Google has also drawn a blank, so far. I'm hoping someone has a simple answer for this.

First, by any chance did your .profile get transferred to your Mac via a Windows system so that it is now <CR><LF> terminated. That will mess up just about every Unix shell
Here are the steps I used to initially get my environment files over to the Mac.
1. Created a tar file on a linux platform with my pre-existing environment files.
2. Tar file was compressed with gzip.
3. Compressed tar file was then burned to CD.
4. CD loaded onto a Windows platform.
5. From Windows platform, tried to email tar file to myself but it was too big to send.
6. From Windows used WinZip to uncompress and open the tar file.
7. Extracted the contents to a folder.
8. Removed unnecessary files from folder to make result smaller. Also split contents of folder into multiple folders.
9. Used WinZip to zip new folders containing necessary files into multiple zip files.
10. Emailed zipped files to my home email account.
11. Opened email from Mac and downloaded zip files.
12. From a terminal window unzipped files using /usr/bin/unzip.
13. Copied environment files to home directory with a cp –pr command.
14. Disabled all environment files (by adding different file extensions) so I could begin experimenting with what I needed to change.
15. Started with the .profile file by commenting out most of the file and leaving just a few commands. This is when my problems began. BTW, I used xemacs to edit the file. Xemacs was download and installed via Macports a while back in preparation for creating a development environment for myself. Getting my login environment going was my next step in the process.
16. Since I couldn't get it to work, I then put nothing but some simple shell commands in the .profile to see what would happen. Commands like pwd, ls, and echo. And as I explained in the original post, the only thing that worked was the echo command.
Looking at the preceding steps, the files were never opened on the Windows platform… is it possible that the WinZip steps caused <CR><LF> characters to appear somehow? Or, is it possible that xemacs messed up my file? I use emacs and xemacs all the time on linux and solaris systems with no such problems. Actually, at one point in my messing with the .profile file, in frustration, I decided to open it with vi. I hate vi, but know just enough to be dangerous. What I did was to remove a blank line (remember, blank lines are generating errors too) and insert another one. I figured vi is about as basic and primitive an editor as you can get. So, if any funny control characters are present, that should at least alleviate the problem. Unfortunately, even that still generated the same error.
Have you tried a simplified .profile?
Yes. See #16 above.
Do you have more than one shell initialization file. Bash will look for
.bash_profile
.bash_login
.profile
in that order and use the first one it finds, then stop looking. If you any of the 2 earlier initialization files, bash will not bother looking at your .profile
No, I do not have more than one initialization file... at the moment. And yes, I know what bash looks for, and in what order. At the moment I am only using a .profile just to see if I can get things working. See #14 and #15 above.
I am assuming your shell is 'bash', the current Mac OS X default, however, if you started using Macs back in the Jaguar days, and have just been upgrading, then you shell might be tcsh, which would not even look at .profile, and trying to run it interactively would generate strange results when interpreted by tcsh.
And of course, it is always possible you intentionally changed your shell. If you did that would be useful information. I suspect you did not, but I figured I would ask.
Yes, I'm using the bash shell. $SHELL returns /bin/bash, and $0 returns -bash.
If your lines end in ^M, then your .profile has been DOS'ified.
Ok, I did the cat command you've suggested. BTW, thanks for the options on the cat command. I didn’t realize cat had options to show special characters. I’ve used it for years and never really looked at the man page on it. I believe there is also a way to see control characters within xemacs, but I can’t remember how to do that.
Anyway, the file is definitely showing ^M characters. My first question is, is ^M the same as <CR><LF>? The reason I ask is it may have been xemacs that put those there, or they may have already been there from the files I transferred from the linux platform. I'm pretty sure xemacs uses ^M's because whatever mode I was able to put xemacs in in the past to see control characters, I'm about 99% sure I've seen all lines ending in that. Of course, that brings me to my next question. If that's true, why do these files work on linux and solaris platforms and not OS X? Like I said, I do most of my editing with xemacs, and I know the environment files were originally created on the other platforms using xemacs.
If you have any ideas on these questions, please enlighten me. In the mean time, I'll play around with trying to get rid of the ^M's to see what happens. Not sure how I'm going to do that though since I'm not that familiar with a lot of other editors, so I wouldn't know how to load the files and remove the invisible ^M characters. I also really do not want to hand type in all my environment files if this turns out to be the problem. And if I use xemacs to perform the editing, then it'll just save the file with ^M's anyway.
Thanks for your help.

Similar Messages

  • Problem with uploading a file in Clustered Environment

    Hi,
    I have a problem with uploading a file in a clustered environment. I have an iview component which facilitates an upload action of an xml config file. The problem is that the upload of the modified XML file is reflected only in the central instance of the cluster and not in the dialog instances. The dialog instances hold the old config file.
    Is there any solution to upload the file to all the nodes in the cluster.
    Thanks
    Kiran

    Hi,
    This is a known problem with clustered environment. Remember that your portal component runs on just on dialog instance and it doesn't automatically have access to the other nodes.  However, there are some ways to get around this
    1. Use KM to store files. KM is a common repository for all application servers and therefore you needn't worry more
    2. Use an external batch oriented product (suresync/robocopy) to synch folders on the different DIs. You basically use your existing portal component, but there is a batch job which makes sure the upload folder is identical on all DIs (however, there is a slight delay depending on how often you run the batch job)
    3. Store the files on a shared disk directly from the portal component.
    Cheers
    Dagfinn

  • Tempo problems with imported wav files

    Hey everyone, sorry if there's a quick fix for this in the forums that I couldn't find, but I've been having some tempo problems with imported .wav files.
    Long story short, my system couldn't handle playing all the tracks for a song while recording drums, so I bounced out an mp3 of the song and put it in a new Logic file so my drummer could just play along to that as I recorded him. Unfortunately, the original song is at 167 bpm, but I forgot to change the bpm in the new Logic file with the .mp3 file of the song to 167 bpm, so it was left at the default 120 bpm.
    So, the drums were recorded at the correct 167 bpm, but Logic thinks that those new drum .wav files should be played at 120 bpm, so when I import my drum tracks back into the original file, they do not play correctly at all.
    I could get record it all again, but I wanted to check if there was a way I could salvage what I already have, since my drummer lives about an hour away right now and can't just come over whenever he wants.
    Thanks for the help! I really appreciate it.

    Hi,
    First, do not use MP3 in Logic, the sound quality is less than AIFF, WAV or CAF, and Logic has to decode it for playback, making it a heavier burden on the CPU than an uncoded audiofile, such as AIFF, WAV or CAF.
    Secondly, audio files are independent of Logic's tempo. If you bounce down an audio file in any format (other than Apple Loop), it will play back at the same speed, +regardless of Logics' tempo setting+, either at recording or playback. Logic doesn't 'think' anything. The BPM is only important to MIDI tracks, or to the spacing between audio files. The audio files themselves *are not affected* by the tempo setting. If you import an audio file of tempo 167 into a 120 BPM project, the file will still play at 167, only Logic will indicate the wrong bar positions.
    regards, Erik.

  • Problem with preview PDF files on Windows 7 32bit

    Hello,
    in my office I have a problem with preview PDF files on my computers. The files are allright, but if I select a file and click on preview mode after ~ 10sec operation system write something "Preview this file is corrupt for PDF Preview Handler wrong". On other 64bit computers with same programs the preview is work. I try uninstall all Adobe soft (Reader, Flash), clean all Adobe data from folders in root and in register, but it is not solve this problem. On Microsoft forums wrote me, that the problem is probably with AR plugin.
    So, can someone help me?
    Config PC:
    Windows 7 32/64bit Pro
    Intel i3, 4GB
    Adobe Reader 11.0.5
    Adobe Flash Player 15 ActiveX
    Adobe Flash Player 15 plugin
    Preview Handler Surrogate Host ver.: 6.1.7601.17514
    Thank you for help.

    I think I figured it out after reading other forums. Thanks!

  • Problem with printing pdf file

    hello,
    lately i have problem with printing pdf file:
    i click on the print button and the respod is very slow
    it takes more than a minute till the print window apears.
    i tryied to install version X but it's the same, the problem exist only when printing via adobe reader,
    other programs i'd working much faster.
    please advice,
    thank you

    No, it is not set to overprint. Also, I have to add that the printing results were not consistent. Sometimes it covered and sometimes it did not.

  • Hi, I have problem with importing MOV files from SJCAM 4000. MOV files are in supported formats for Adobe Premiere Elements 11. But if I'm importing MOV file, only audio part is imported, video part is not imported. How can I solve this problem?

    Hi, I have problem with importing MOV files from SJCAM 4000. MOV files are in supported formats for Adobe Premiere Elements 11. But if I'm importing MOV file, only audio part is imported, video part is not imported. How can I solve this problem?

    haben
    From looking at the specifications of your camera (SJCam 4000), we know already what video compression your camera is using. It is H.264.
    A H.264.mov file should be supported by Premiere Elements 11. On what computer operating system is your Premiere Elements 11 running?
    Do you have the latest version of QuickTime installed on your computer? And, are you running QuickTime and Premiere Elements 11 from a
    User Account with administrative privileges? Please go to Premiere Elements 11 Publish+Share/Computer/QuickTime to confirm that you find
    presets there for the QuickTime choice there.
    What are the properties of these H.264.mov files - is it 1080p30 (1920 x 1080p30)  or something else? Do you know if this camera is recording with a variable or
    a constant frame rate?
    Please review and consider and then we will decide what next.
    Thank you.
    ATR

  • Hi! I´m having problems with showing video files in Qlab on my Macbook Air. A sound/video technician told me to "blow out" my Mac. Was told to use  cmd+ r  when restarting. Is this the right way?

    Hi! I´m having problems with showing video files in Qlab on my Macbook Air. It started suddenly. Consulted a sound/video technician who told me to "blow out" my Mac. Was told to use cmd+r  when restarting. Is this the right way to clean up my Mac? And is it likely that some kind of bug is causing problems for Qlab to show video files? I´ve already tried with a bunch of different video files and sometimes Qlab plays them and sometimes not. I need the Qlab playlist for a theatre show and only have a week until showtime so starting to really worry. Is there anyone out there who can help?

    Your Mac runs maintenance in the background for you.
    Command + R gives you access to restore, repair, or reformat the drive using OS X Recovery
    No idea why that was suggested.
    You may have a third party video player installed that's causing an incompatibility issue.
    Check these folders:
    /Library/Internet Plug-Ins/
    /Library/Input Methods/
    /Library/InputManagers/
    /Library/ScriptingAdditions
    ~/Library/Internet Plug-Ins/
    ~/Library/Input Methods/
    ~/Library/InputManagers/
    ~/Library/ScriptingAdditions
    The first four locations listed are in the root-level Library on your hard disk, not the user-level Library in your Home folder.The tilde (~) represents your Home folder.
    To access the Home folder in OS X Lion or Mountain Lion, open the Finder, hold the Option key, and chooseGo > Library.

  • I can not do the update , what should I do to fix this error ? "There was a problem with downloading the file . For tips on troubleshooting , please go to Customer Support . ( Error code : 204 ) ." thanks

    I can not do the update , what should I do to fix this error ?
    "There was a problem with downloading the file . For tips on troubleshooting , please go to Customer Support . ( Error code : 204 ) ." thanks

    Hi,
    Please refer to the help document below:
    Error downloading, installing, or updating Creative Cloud applications
    Regards,
    Sheena

  • InDesign CS5 causing problems with InCopy assignment file but not content files

    I'm having a strange InDesign/InCopy CS5 issue (Mac OSX 10.6.6; all system & Adobe updates are current).  In my InDesign doc I have one assignment file containing two content files. All of the InCopy pieces work fine in InDesign (i.e., I can check out/in, edit, etc.).  When I go to open the assignment file in InCopy, InCopy starts to open  it but then crashes. If I try to open each content file directly in  InCopy, no problem. I've tried deleting and recreating new assignments  in InDesign, but they all have the same result in InCopy.
    I think this actually is a problem with the InDesign file because if I export the InDesign file to IDML, then try to open the IDML file, InDesign crashes! I've trashed my InDesign preferences, made sure all cross-references are up to date, etc. Anybody have any ideas what else to look for in my InDesign file that might cause this problem?
    Thanks!
    Andrea

    Thanks John!
    1) Here are the first 10-ish lines from the crash report that is generated when I try to open the IDML file:
    Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
    0   ???                               0xa0c266f0 _XHNDL_trapback_instruction + 0
    1   com.adobe.InDesign.Indexing       0x20778192 GetPlugIn + 341394
    2   com.adobe.InDesign.Indexing       0x20779009 GetPlugIn + 345097
    3   PublicLib.dylib                   0x0129228b CScriptProvider::AccessProperties(IScriptRequestData*, IScript*) + 571
    4   com.adobe.InDesign.Scripting      0x1f4befe8 GetPlugIn + 166440
    5   com.adobe.InDesign.Scripting      0x1f4c2e31 GetPlugIn + 182385
    6   com.adobe.InDesign.INXCore        0x20641444 GetPlugIn + 45220
    7   PublicLib.dylib                   0x0142c9e8 CScriptDOMElement::GetMultipleAttributes(K2Vector<IDType<ScriptID_tag>, K2Allocator<IDType<ScriptID_tag> > > const&, adobe::version_1::vector<KeyValuePair<IDType<ScriptID_tag>, DOMAttributeValue>, adobe::version_1::capture_allocator<KeyValuePair<IDType<ScriptID_tag>, DOMAttributeValue> > >&) + 280
    8   PublicLib.dylib                   0x0142bd38 CScriptDOMElement::InsertProperties(adobe::version_1::vector<KeyValuePair<IDType<ScriptID _tag>, ScriptData>, adobe::version_1::capture_allocator<KeyValuePair<IDType<ScriptID_tag>, ScriptData> > >&, adobe::version_1::vector<KeyValuePair<IDType<ScriptID_tag>, DOMAttributeValue>, adobe::version_1::capture_allocator<KeyValuePair<IDType<ScriptID_tag>, DOMAttributeValue> > > const&, short, short) + 1336
    9   PublicLib.dylib                   0x0142beab CScriptDOMElement::SetSimpleAttributes(adobe::version_1::vector<KeyValuePair<IDType<Scrip tID_tag>, DOMAttributeValue>, adobe::version_1::capture_allocator<KeyValuePair<IDType<ScriptID_tag>, DOMAttributeValue> > > const&, short) + 91
    10  PublicLib.dylib                   0x0142c0d3 CScriptDOMElement::SetAttributes(adobe::version_1::vector<KeyValuePair<IDType<ScriptID_ta g>, DOMAttributeValue>, adobe::version_1::capture_allocator<KeyValuePair<IDType<ScriptID_tag>, DOMAttributeValue> > > const&) + 51
    11  PublicLib.dylib                   0x0142a2ea CScriptDOMElement::SetAttribute(IDType<ScriptID_tag>, DOMAttributeValue const&) + 202
    2) That works. Moved all pages (frame threading was preserved) to a new doc, exported to IDML, opened new IDML file just fine. Woo hoo! One of my editors won't be pleased that all of the tracked changes have disappeared, but at least the file functions now
    Wish I knew what caused the problem in the first place so we could (hopefully) prevent this from happening again. Any ideas?
    Thanks again for your help!
    Cheers,
    Andrea

  • Problem with printing txt file

    I have a problem with printing txt file. My code looks like :
    String filename = something.txt";
    DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
    PrintService[] services = PrintServiceLookup.lookupPrintServices(
              flavor, null);
    PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
    pras.add(PrintQuality.DRAFT);
    pras.add(new Copies(1));
    pras.add(MediaSizeName.ISO_A4);
    pras.add(Sides.ONE_SIDED);
    pras.add(Chromaticity.MONOCHROME);
    PrintService service = ServiceUI.printDialog(null, 200, 200,
              services, services[0],
              null,
              pras);
    if (service != null)
    try
    DocPrintJob job = service.createPrintJob();
    FileInputStream fis = new FileInputStream(filename);
    DocAttributeSet das = new HashDocAttributeSet();
    Doc doc = new SimpleDoc(fis, flavor, das);
    job.print(doc, pras);
    Thread.sleep(10000);
    catch(FileNotFoundException e)
    catch(PrintException e1)
    catch(InterruptedException e2)
    It doesn't work :(
    What is my purpose: I would like to print .txt file but I would like to get PrintDialog where I can choose PrintQuality, Chromaticity etc. I found also that I should use DocFlavor.INPUT_STREAM.TEXT_PLAIN_HOST but I don't know how.
    I will be very gratefull for help :)

    I tested it on 3 printers (different models of hp). 2 of them don't give me any error but when it started print priter stoped (just as it dosesn't have a paper), but 1 of them doesn't react (there were no errors), i thought tahat something was wrong with printers but when I change DocFlavor.INPUT_STREAM.AUTOSENSE to DocFlavor.GIF and filename to dog.gif it works so mybe there is another way to print txt file

  • For the last 2 days whenever I try to upload photos from my iPhoto page to facebook I get an error message: Bad Image There was a problem with the image file.  I haven't knowingly changed any settings on iPhoto or facebook. Can anyone help, please ?

    I need help with uploading photos from iPhoto to facebook. I could do it till 2 days ago. Now any new photo I try to upload gives me an error message:
    Bad Image
    There was a problem with the image file. 
    Please help.

    Can you drag it to the Desktop?

  • Problems with reading XML files with ISO-8859-1 encoding

    Hi!
    I try to read a RSS file. The script below works with XML files with UTF-8 encoding but not ISO-8859-1. How to fix so it work with booth?
    Here's the code:
    import java.io.File;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.net.*;
    * @author gustav
    public class RSSDocument {
        /** Creates a new instance of RSSDocument */
        public RSSDocument(String inurl) {
            String url = new String(inurl);
            try{
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(url);
                NodeList nodes = doc.getElementsByTagName("item");
                for (int i = 0; i < nodes.getLength(); i++) {
                    Element element = (Element) nodes.item(i);
                    NodeList title = element.getElementsByTagName("title");
                    Element line = (Element) title.item(0);
                    System.out.println("Title: " + getCharacterDataFromElement(line));
                    NodeList des = element.getElementsByTagName("description");
                    line = (Element) des.item(0);
                    System.out.println("Des: " + getCharacterDataFromElement(line));
            } catch (Exception e) {
                e.printStackTrace();
        public String getCharacterDataFromElement(Element e) {
            Node child = e.getFirstChild();
            if (child instanceof CharacterData) {
                CharacterData cd = (CharacterData) child;
                return cd.getData();
            return "?";
    }And here's the error message:
    org.xml.sax.SAXParseException: Teckenkonverteringsfel: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (radnumret kan vara f�r l�gt).
        at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
        at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
        at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
        at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
        at getrss.RSSDocument.<init>(RSSDocument.java:25)
        at getrss.Main.main(Main.java:25)

    I read files from the web, but there is a XML tag
    with the encoding attribute in the RSS file.If you are quite sure that you have an encoding attribute set to ISO-8859-1 then I expect that your RSS file has non-ISO-8859-1 character though I thought all bytes -128 to 127 were valid ISO-8859-1 characters!
    Many years ago I had a problem with an XML file with invalid characters. I wrote a simple filter (using FilterInputStream) that made sure that all the byes it processed were ASCII. My problem turned out to be characters with value zero which the Microsoft XML parser failed to process. It put the parser in an infinite loop!
    In the filter, as each byte is read you could write out the Hex value. That way you should be able to find the offending character(s).

  • Problem with initialization Delta queue

    Hi Gurus,
    I have problem with initialization of delta queue when I try load transaction data from R3 (FM) to BI.
    Error message: Deviation of (64 seconds) between qRFC counter (000012365466830000080000) and actual time (08.03.2009 21:10:19).
    I have no idea where is the problem because this problem occurs only in PRD systems. In DEV and QUA system everything is OK.
    System BI: BI 7.0
    Source system: ECC 6.0
    Thank you for all answers!
    mp

    Hi,
    Replicate the DS in BW Prod and then Activate Transfer rules and then try.
    First you delete the DElta quae in RSA7 for the particular datasource in the R/3
    source system then you try to intialize, here you are trying to intialize datasource with
    same selection conditons . thats why it is giving shortdump
    Check
    Business Content and Extractors
    Thanks
    Reddy

  • Premiere Pro CS5: please help problem with importing a file error output "there was an error decompressing audio or video"

    please help problem with importing a file error output "there was an error decompressing audio or video"

    this is related to what adobe program/version?

  • HT1338 I have a problem with opening downloaded files from the internet; zip types. Can you tell me an app to open these types of formats of files?

    I have a problem with opening downloaded files from the internet; zip types. Can you tell me an app to open these types of formats of files?

    It should unzip if you double-cick.
    What are you seeing happen when you do that?
    Select a .zip file in the Finder and Get Info (cmd-i). What is set for it to Open With. It should be Archive Utility.

Maybe you are looking for