Creating an executable script with vi and chmod

I have some after market packages I want to set up in my MBP Mavericks. I create a script file in iv called runada. It adds some directories to the global $PATH variable. I then change rights on the script, runada, with 'chmod a+x runada' so it becomes an execuitble. But it fails when I call runada within a shell terminal. I have seent his work in Debian I think.

As a guess: PATH needs to be exported if you want that setting to persist after the script modifies it and exits, or you'll need to "." or "source" invoke the script.
In any case, post a reproducer of the bash and somebody here can have a look.
Using homebrew is another approach to rolling your own packaging (if that's where you're headed here), and there are various alternatives to that.

Similar Messages

  • How to create a transport request with query and only with its structure.

    HI guru,
                how to create a transport request with query and only with its structure.transport request should not  include any other query items like ( variables, conditions...etc)
    thanks in advance.
    venkata

    Hi,
    Goto RSA1 and then Transport Connection -> In SAP Transports select Object Types-> Query Elements -> Then select Query->Give Technical name of the query and then select for transfer. In the right side you can choose the components which you wanted to transport.
    Regards,
    anil

  • I'm so confused!! I just want to create interactive pdf files (with video and flash files), but this free trial version is confusing!! help!?!

    i'm so confused!! I just want to create interactive pdf files (with video and flash files), but this free trial version is confusing!! help!?!

    Thanks for your suggestions. I checked to see if the options you suggested were set incorrectly but they were set to sync all. This led me to think the problem was actually in the iphone. I re-initialized the iphone and did not allow the system to restore any of the previous settings. In essence, I forced the phone to reset to factory settings. Then my video podcasts started syncing. All is well now. I did notice that I had seven podcasts selected that were "HD" presentations, and as such, are not compatible with the iphone. I don't know if this had anything to do with my earlier situation, but now I'm getting the video podcasts automatically. I'm happy. It wasn't much fun forcing the iphone to forget all of my preferences and I'm still customizing the phone now several days later. I think I have everything working and back to normal except I haven't identified any of my email accounts as of yet. Thanks for your help.

  • I have created a slide show with pictures and music in Iphoto and when I try export it I get Error You do not have sufficient permission for this operation.

    I have created a slide show with pictures and music in Iphoto and when I try export it I get Error You do not have sufficient permission for this operation.  Try to export to an external HD attached, all help would be gratefully received 

    Have you ever successfully saved anything to that external drive? My first two thoughts are that the drive isn't formatted for the Mac or that you don't have rights to save to the drive.

  • How to create a .exe script to start and stop Oracle EBS R12 in Linux

    Hello,
    I have installed Oracle EBS R12 in Linux enterprise through Virtual box on windows 7 professional. It takes a long time to start and stop EBS as I have to start and stop the scripts manually - can someone please help me with the following (I have tried searching the web and Oracle for help but have had no joy);
    Q1. I want to create a executable file in Linux so I can double click the file in Linux to start EBS automatically instead of going through each script manually
    Q2. I want to create a executable file in Linux so I can double click the file in Linux to stop EBS automatically instead of going through each script manually
    you help will be appreciated.
    Ali

    I have installed Oracle EBS R12 in Linux enterprise through Virtual box on windows 7 professional. It takes a long time to start and stop EBS as I have to start and stop the scripts manually - can someone please help me with the following (I have tried searching the web and Oracle for help but have had no joy);
    Q1. I want to create a executable file in Linux so I can double click the file in Linux to start EBS automatically instead of going through each script manually
    Q2. I want to create a executable file in Linux so I can double click the file in Linux to stop EBS automatically instead of going through each script manually
    you help will be appreciated.Please see these links.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Autostart+AND+Services&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Auto+AND+Start+AND+Services&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Managing Server Processes
    http://docs.oracle.com/cd/E18727_01/doc.121/e13675/T530130T530133.htm#5274555
    Thanks,
    Hussein

  • MAC AE plugin: Bundle scripts with plugin and access for execution

    Hi there,
    as the title says I'm trying to execute some scripts from my plugin but I can't figure out how to get the plugins location to access the bundled resources. I'm pretty new to the  plugin development so can sombody please point me in the right direction?
    I found in the SDK guide the PF_GET_PLATFORM_DATA but there is no example that is using it.
    Thanks in advance
    Fabian

    Hi shachar thanks for your help,
    I tried reading a text file that is bundled with the .plugin package without path but I had no luck. The structure within the package is like this (tree looks better with monospaced fonts):
    ├── Info.plist
    ├── MacOS
    │   └── EXECUTABLE
    ├── PkgInfo
    └── Resources
        ├── EXECUTABLE.rsrc
        ├── bundle-test.txt
        ├── example.txt
    And my code is like this:
                    string line;
                    string alllines("");
                    ifstream myfile ("../Resources/example.txt");
                    if (myfile.is_open()){
                        while ( myfile.good() ){
                            getline (myfile,line);
                            cout << line << endl;
                            alllines+=line;
                        myfile.close();
                        suites.UtilitySuite3()->AEGP_ReportInfo( S_my_id,alllines.c_str());
                    }else{
                        cout << "Unable to open file";
                        suites.UtilitySuite3()->AEGP_ReportInfo( S_my_id,"Error Reading file");
    So my result is always my error reading file.
    I also tried using getcwd like this:
                    char cwd[256];
                    if (chdir("/tmp") != 0)
                        perror("chdir() error()");
                    else {
                        if (getcwd(cwd, sizeof(cwd)) == NULL)
                            perror("getcwd() error");
                        else
                            printf("current working directory is: %s\n", cwd);
    But ther i get a current working directory as: /private/tmp
    So how did you manage to read files bundled with your plugin? Magic?
    Maybe there is something else I missed.
    - I added the files to my source directory.
    - I went in xcode rightclick onto the project and selected "add files to PROJECTNAME"
    - in the TRAGETS Tab for the project the file is under "Copy Bundle Resources"
    - When building the plugin the file I want to read is within the .plugin package
    What else could go wrong?
    I could also create a script that escapes my script and creates an .h file with a string where I could read from, but this would feel like giving up and I'm not there yet.
    I appriciate your help a lot. (to everyone and specially to shachar)
    Cheer
    Fabian

  • [SOLVED] Can't execute scripts with Thunar/XFCE. (Runs OK in terminal)

    Until recently, I could double-click a script (or link to a script) in Thunar or on the XFCE desktop, and it would execute
    Now, however, when I double-click a script, it opens in Leafpad (my text editor).  I've browsed the wiki and searched the forum and web, but can't find any clues as to what has changed or why this is happening.
    I can right-click in Thunar and use the "Open With>" option to set the script to open with another application, but there's no obvious option to run a script.  Opening with a terminal emulator results in a brief hourglass, then nothing.
    The script I'm testing with (the Tor Browser Bundle startup script) is in my /home/myname directory, has -rwx------ permissions (with me as the owner), and the file type in Thunar shows "shell script".  It runs fine if I execute it in a terminal with "sh /path/to/script" -- just not via Thunar or the XFCE desktop.
    Can anyone suggest anything I could check?
    Last edited by esuhl (2015-03-08 09:49:52)

    foutrelis wrote:
    This is an intended change in Thunar 1.6.5: https://bugzilla.xfce.org/show_bug.cgi?id=7596#c15
    Thunar 1.6.6 has a hidden option to restore the old behavior: http://git.xfce.org/xfce/thunar/commit/?id=b385bcf
    The option is called misc-exec-shell-scripts-by-default and can be set using xfce4-settings-editor or by following the instructions here:
    http://docs.xfce.org/xfce/thunar/hidden-settings
    Thanks so much for the explanation!
    I tried creating "misc-exec-shell-scripts-by-default" in the Settings Editor, set to true, but it didn't seem to have any effect.  So I tried this in a terminal, also to no effect:
    xfconf-query --channel thunar --property /misc-exec-shell-scripts-by-default --create --type bool --set true
    If I right-click on a script, the top item on the menu is still "Open with Leafpad".  Do I somehow need to change the default behaviour to "execute script"...?  I've searched but I can't seem to find any further information.
    I guess it's not a big deal, but it would be nice to restore the default behaviour.

  • Scripting with FTP and HTTP

    Hi All,
    To help us with future planning, we would like to get a feel for how many developers are using the FTP and HTTP objects that are available with scripting in CS3 (through webaccesslib). If you are using them could you send me a quick email describing how you use the component? My email address is [email protected]
    Thanks in advance.
    Alan Morris
    Dev Tech Engineer
    Adobe Systems

    Yeah, this is so aggrevating!
    Adobe builds all of these cool ideas, then doesnt test them.
    The HTTPConnection object does not do POST at all. I have tried nearly every possibility. The documentation is either way off or the object just does not work. I can see the post in raw form and the POST variables are not coming across.
    After working on this for a few hours i thought to myself, hey maybe i should just create a flash pane instead and load the files into it, then have the flash object upload. Well i ran into a big fat wall there too! As it is with patchpanel and bridge, these technologies only accept swf objects. This whole concept of using SWF and crossscripting has a huge flaw. The SWF file's security format does not allow for local file access for doing simple things like upload. If i can't synchronize file data to web based clouds, then i cant do much worth talking about.
    I love these products and their possibilities but i have to have the ability to communicate with the world. HTTP is the way!
    Also a side note, FTP is an insecure/inflexible solution and looks like a lot more time was spent on this aspect of the scriptable product.
    PLEASE HELP ADOBE!!!!!

  • Creating a dialog box with OK and Cancel buttons without OADialogPage

    Hi Experts,
    i want to create a dialog box for Delete Confirmation means after clicking on delete it should pop up a small dialog box with OK/Cancel buttons
    and need code for the same to handle the buttons.
    i have created with OADialogPage but its showing in a complete page but i want to show those buttons in a small box.
    Plz help.
    THANKS IN ADVANCE.
    Thanks
    Raja.

    Hi,
    I have not tried using javascript in destination URI as suggested by Mukul.
    I have tried the below code for opening a page as dialog box.
    You can try it for your requirement by creating a dialog page of your own, say XXDialogPage (with OK and Cancel button)
    StringBuffer l_buffer = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    String url = "/OA_HTML/OA.jsp?page=/xx/oracle/apps/fnd/dialog/webui/OADialogPG";
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:500, height:500},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    In dialog page's controller, you can forward it to the page onc ethe user selects OK or Cancel.
    Pass the selected value back to the main page and further you can use it for deleting.
    Regards.

  • We created a pdf document with comments and hyperlinks. On iPad, comments/hyperlinks disappear.

    Using Acrobat Pro 9, we created a pdf with comments and hyperlinks to be shared with a large community on the iPad, through a server. Once the document is opened on the iPad, all the comments and hyperlinks disappear. Are we missing a tool on the iPad or is there a different way to create this file? Thank you.

    Is everyone on the iPad using the latest version of Adobe Reader mobile for iOS (10.6 at the moment)? You can see all the comments (including drawing markups) as well as view the notes attached to text markup with this version.

  • How can I create transparent animated  text with Motion and Final Cut Pro?

    Hi all,
    I am trying to replicate an effect that a previous video editor did in a project, but I can't contact them.
    They made animated text in Live Type, and saved it as a QT movie. When this text is placed over existing video in the FCP project, the text is "transparent", basically it acts like text created in FCP (You can see the background image behind the text, like through the middle of the letter "o").
    I have made some animated text in Motion, but when I save it as a QT movie, and bring it into FCP, the whole 1280x720 screen is covered by this movie, and I have to crop it so it does not cover the background image. It is all black except for the text. And of course the text is not on a transparent layer. Any ideas how I can create this effect with animated text? I've tried messing with transparency and overlay settings, nothing seems to work.
    Running latest version of Final Cut Studio...
    Thanks
    Dave

    Just bring the Motion (.motn) project into FCP and lay it over your clip.
    The QT you're exporting has to carry the alpha channel (animation codec, million+ colors), but don't waste your time/disk space with that. Just bring the motion project into FCP.
    Patrick

  • UNIX scripting with id and password in clear text

    Hi
    I have a shell script to connect and do several PLSQL.
    how can the script doing it without the ID password in cleartext?
    i.e.
    #!/bin/sh
    conn id/password ....

    If you create an operating system authenticated user, you connect to the database without a password, i.e.
    sqlplus / is sufficient (assuming the script is running as the appropriate operating system user). Tom Kyte talks about this here
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1477204811604
    There are examples of using DBMS_SCHEDULER to invoke operating system scripts on Tim Hall's site
    http://www.oracle-base.com/articles/10g/Scheduler10g.php
    Justin

  • Dyanamic table is SAP Script with horizontal and vertical lines

    Hi,
    I need to display the data of the table in the SAP script which is having both horiziontal and vertival lines.
    the out put needs to looks as it in Excel...where there are multiple records with 5 fixed coulmns each seprated from one another by horizonalt and vertical lines..
    I thinking about useing the Box with XPOS and YPOS who value changes dynamicaaly..
    But again as the number of pages might be more than one..i think there will issues,
    Can you  let me know how to proceed in SCRIPT ,,,, where the number of records might vary ..and also ..it might continue to second page..
    Regards
    Senthil

    well it is possible but quite tricky.
    All you got in SAP-SCRIPT to achieve this is the BOX-Statement.
    The BOX statement works with variables for XPOS, YPOS, WIDTH and HEIGHT. what you need to do is:
    - calculate those variables during runtime
    - add box-statements with those variables.
    to calculate those variables you need to count used lines and so on. i hope i showed you a way, rest is a lil brainwork then.
    regards

  • What is the best third party extension or software to create a flip book with zoom and clear text?

    When I export a swf from Indesign with Page curl, the text is hard to read (blurry) and there is no zoom feature or navigation bar. Is there a specific software I should download instead of exporting from Indesign.

    Well there´s plenty of solutions for that, which one is correct depends on what kind of content you wish to have. And you should also note that SWF/Flash based solutions are not compatible with mobile/tablet devices. Anyway if you
    -need a solution for passive print replica content, you will find lot´s of different services and softwares which are able to convert your PDF to Flash/SWF. You can´t usually use any interactive elements or rich media in those cases.
    -need to make your SWF with InDesign and you want to use videos, links, slideshows etc. Then you need a 3rd party finalizer which you can use to wrap your InDesign SWF to better working user interface. One solution is eDocker FLASH! Here´s a sample of InDesign SWF finalized with eDocker: http://old.edocker.com/_demo/edocker-online-demo/index.html
    More info about the product: http://www.edocker.com/edocker/edocker-flash/ or eDocker :: eDocker2 Desktop Publisher®
    I think eDocker FLASH! is in some kind of 50% discount right now.
    -need to make publicaton that works with computer and mobile/tablets. Then you may have to drop Flash and check out HTML5 solutions. Some of the more advanced flip-page services are offering also conversion to HTML5 but be careful if you need interactive elements and/or rich media, most of them are ripping all that off.  At least eDocker and 3dIssue are offering HTML5-solutions with possibility to use interactivity/rich media...
    eDocker CREATE! HTML5 editor & InDesign plugin
    http://www.edocker.com/edocker/edocker-create/
    3Dissue
    Digital Magazine Software | Create Digital Online Publications

  • How do you create a jar file with txt and classes?

    Hey, I'm trying to create code to create a jar file with a text file, but I can't figure out how to add the text file. Here is what I have so far:
    try {
                // Name of jar file to write
                String archiveFile = "test.jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("test.txt"));
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
            }It creates the .jar file with the correct manifest but I can't get it to write the test.txt or anything else into the jar file.
    -Gandolf
    Edited by: GanMatt on Jun 18, 2009 8:18 AM
    Edited by: GanMatt on Jun 18, 2009 8:19 AM

    Alright, my question has changed. Here's the code:
    try {
                // Name of jar file to write
                String archiveFile = "test.jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("test.txt"));
                out.write("Hi".getBytes());
                out.flush();
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(this,ex.toString(),"BUG!",JOptionPane.INFORMATION_MESSAGE);
            }It creates the jar file with the txt file inside it, but I can't write "Hi" inside of the text file. Any ideas?
    -Gandolf

Maybe you are looking for

  • "Error 1002097 Unable to Load database" while starting an Essbase App.

    Hello Essbase Experts, I am getting below error while starting an Essbase Application: "Error 1002097 Unable to Load database" Below is an extract from the Essbase Application Log: [2012-04-04T14:14:03.816-19:14] [RPA] [ESM-6] [ERROR] [32][] [ecid:13

  • No Sender messages in All Inboxes

    When I open "All Inboxes" on my iPhone, there are over 100 apparent messages, with the notation No Sender" and anomalous dates (at least usually 12/21/69). All say "this message has no content". None of these "messages" appear in the listings for any

  • Need help sharing photos.

    Any attempt to share photos via photo mail or email attachment through share menu causes Elements 12 to crash.

  • HT1386 Initial iTunes sync witnout iCloud?

    I'd like to add my iTunes library to my PC at work, which I can activate no problem. The Problem is that it's about 100GB and I can't just use up the company's bandwidth for a whole day, so I need an offline solution for the initial sync. Can I do th

  • CRM and ERP Materials Replication

    Dear friends, I want to know please how can i replicate materials in MM module in sap ERP that has characteristics and classes to sap CRM, and i want to know if there is prerequisite to do this without facing any problems. Best Regards, Mohamed