Downloading shell scripts with safari changes filename

Hi,
When I download a shell script using Safari, the file is saved with a ".sh" at the end, even if the file doesn't have any extension. Is there a way to have Safari just same the file with the original filename and not add the ".sh"?
Thanks,
Allan

Interesting that Safari even knows what a shell script is. Its just a text file, with the user's executable bit set. Curious. Does Safari assume any executable text file is something that should be run from the shell? That would be strange, as anything I pull off my FAT32 drive has the executable bit set, too (thanks, Windows).

Similar Messages

  • HT5701 Cannot download pdf files with Safari 6.0.4?

    Cannot download pdf files with Safari 6.0.4

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • How do you pass shell scripts with cocoa?

    How do you pass shell scripts with cocoa?

    You asked for more detail -- I don't know if this is what you were referring to or not, but here's a little more detail on how to use the system() function if that's what you wanted to know.
    As etresoft mentioned, the system() function can be useful for the kind of thing you are talking about. You will need to write the following statement at the top of your code if you want to use it:
    #include <stdlib.h>
    To use the system() function, simply put the command as you would write it in the Terminal between double quotes between the parenthesis. For example, something as simple as:
    system("ls");
    I don't what the practical use of the above statement would be, but it will run, and that's the general format for the system() function. So just put between the quotes whatever command you want to send.
    Hope there was something helpful here.

  • Executing a shell script with DBMS_SCHEDULER

    Hi,
    when I execute a shell script with DBMS_SCHEDULER this doesn't works correctly
    BEGIN
    DBMS_SCHEDULER.create_job
    job_name => 'job_AR',
    job_type => 'EXECUTABLE',
    job_action => '/home/crm/crmdw/AR/start_execution.sh',
    enabled => TRUE,
    start_date => systimestamp,
    repeat_interval => 'FREQ=MINUTELY;INTERVAL=15',
    comments => 'Test Job AR'
    END;Inside the shell script there is a code who call a Hierarchy of process,
    if I executed it manually or with a cron, it works perfectly
    but when I execute it with the job that I've described before it's executes
    all process at same time and it doesn't work.
    What can I do to fix the issue,
    any Ideas?
    Thanks in advanced...

    #!/usr/bin/ksh
    #test_dbms_scheduler.ksh
    echo $1
    echo "I am in Unix"
    exit 0
    chmod 755 test_dbms_scheduler.ksh
    Create or replace procedure test_dbms_scheduler
    as
    v_text varchar2(255) := 'Parameter passed from Oracle to Unix';
    Begin
    dbms_output.put_line("I am in Procedure");
    dbms_scheduler.create_job
    (job_name=>'test_dbms_scheduler',
    job_action=>'/usr/bin/test_dbms_scheduler.ksh',
    number_of_arguments=>1,
    job_type=>'executable',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=SECONDLY; INTERVAL=1',
    enabled=>false,
    auto_drop => TRUE,
    comments=> 'Run shell-script test_dbms_scheduler.ksh');
    dbms_scheduler.set_job_argument_value(job_name =>'test_dbms_scheduler', argument_position => 1, argument_value => v_text);
    dbms_scheduler.enable('test_dbms_scheduler');
    dbms_output.put_line("I am back in Procedure");
    Exception
    when others then
    dbms_output.put_line(sqlcode||sqlerrm);
    end;
    set serveroutput on
    exec test_dbms_scheduler;

  • Problem downloading large pdf with Safari

    Has anyone else had this problem when clicking on a link to a large pdf file (1MB) I get a blank screen in Safari. When I try with firefox its fine only with safari is there anything I need to change to allow downloads of larger pdf files in safari?

    1MB isn't a particularly large file at all. Can we assume that you've verified that Safari will open smaller PDF's?
    Also, you haven't mentioned what Adobe product and version you are using (may help to give the version of Safari as well).

  • Sqlplus in Shell Script with startup pfile

    I have the following entry in my Korn shell script:
    ${ORACLE_HOME}/bin/sqlplus -s /nolog << EOSQL >> ${PR_LOG}
    connect / as sysdba
    whenever sqlerror exit sql.sqlcode;
    startup pfile "/u01/app/oracle/admin/${ORA_SID}/pfile/spfile${ORA_SID}.ora";
    EOSQL
    When I execute the script I get the following errors:
    LRM-00123: invalid character 0 found in the input file
    ORA-01078: failure in processing system parameters
    I've isolated the problem to the 4th line. When I change it to simply "startup", everything works. I did try changing the quotes to ` and ', but those didn't work. I even explicitly listed the ORA_SID, and I'm still getting the same error messages.
    Any ideas how I can resolve my problem with the 4th line? All help is appreciated.

    and yes I want to start the database with the spfile.
    If I just use "startup", everything is fine; and I can start the database with the spfile, because I have a symbolic link under $ORACLE_HOME/dbs to point to my actual spfile location - /u01/app/oracle/admin/salsa/pfile/So... what's the problem ? Just use "startup", if I'm not wrong you'd use the same spfile.
    To use that syntax you should create a file with a line like this
    spfile=<path of spfile>
    and start as
    startup pfile='<path of that file>'

  • Trouble using Run Shell Script with python in Automator

    Hi. I have a python script I want to run in Automator (update_puzzles.py). All it does is check, rearrange and update files and there is not supposed to be any input. I can get the script to run outside of Automator, in Terminal, by navigating to the right directory and typing "python update_puzzles.py"
    I must not be setting up Run Shell Script correctly. I have it set to /bin/bash and Pass Input to stdin. The command line simply reads python /pathname/update_puzzles.py (where pathname is the path to the .py file, which I got by dragging the file onto the Run Shell Script command window). There are no actions before this in my workflow and the action after is View Results.
    The log says Run Shell Script failed, and the error is "Traceback (most recent call last):"
    Any suggestions?
    Thanks so much.

    If the script is expecting to do stuff with files in the same directory as the executable, you will probably need to add a statement to change to the appropriate working directory. The shell used in the Automator *Run Shell Script* action is a generic one that does not share any of the environment variables that the Terminal uses.

  • Can no longer download journal articles with Safari or Firefox

    As of three weeks ago I am no longer able to download and save journal articles, though I am able to read them.  I can save documents when there is simply a "save" or "view" button indicated next to a document in small blue letters if I click the "save" button.  Using OSX 10.6.8 on a MacBookPro
    Any help would be greatly appreciated!

    Try deleting the cache associated with Safari ...
    Quit Safari.
    Open the Finder. From the Finder menu bar click Go > Go to Folder
    Type or copy / paste:   ~/Library/Caches/com.apple.Safari
    Click Go then move the Cache.db file from the com.apple.Safari folder to the Trash.
    Relaunch Safari to test.

  • How to run a java class from a shell script with passing arguments

    hi,
    I have a jar with all the required classes. I was using ant to run the classes i needed.
    But now i want to use a shell script to run the class, also the class accepts some arguments so when script is run it should accept arguments.
    So can any one tell me how to set class paths, jar location and call the required class from shell script or batch file with passing arguments to it.
    Thanks in advance.

    Let's say that the order of arguments is as below
    1. Jar file name
    2. Classpath
    Your shell script would look like this
    java -cp $CLASSPATH:$2 -jar $1 I am assuming that your jar file has the required main-class entry in its manifest. Note that $1...$9 represent the arguments to this shell script.
    The same goes for a batch file
    java -cp %CLASSPATH%;%2 -jar %1

  • How to not append '.PART' to the file name of the currently downloading file, and just download the file with its normal filename

    In Windows, when Firefox (I'm currently using 7.0) downloads a file, it appends ''.PART'' to the file name of the currently downloading file and just renames it to its original file name after it finishes downloading.
    I sometimes like to watch a currently downloading video file, so it will be better if Firefox just downloads the file to its actual filename (like what Opera does), so I can easily double click the incompletely downloaded file and watch it with the video player assigned to that file extension, rather than the awkward ''Right click -> Open With -> Choose Default Program'' route with .part files.
    Does anyone know how to set Firefox to do this?

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox and prevents Firefox from renaming the .part file.
    Try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    See "Disable virus scanning in Firefox preferences - Windows"
    * http://kb.mozillazine.org/Unable_to_save_or_download_files

  • Accessing Shell script form Safari

    Hello All,
    I have a shell script that i use for rdp. At the moment when i run "connect.sh rdp://myserver" from command line, it works perfectly calling rdesktop and querying the authentication servers.
    However i have been trying to use the automator (Utilities > Run Shell Script) to allow me click on rdp links on webpages but i cant seem to get it to work.
    Please can anyone help with this?
    Thanks

    I'm not sure if I understand your reply about my response. But perhaps you'll find the "sudo" command helpful, which unlike the "su" command, will prompt the users for their own password, or no password according to /etc/sudoers. You use the "visudo" command to edit the file. The sudo command is normally used to run system administration tasks, without giving the user the root password but it can also be used to give access only to certain commands. The -u option causes sudo to run the specified command as a user other than root. I have not used "sudoers" for anything else but root, but there are plenty of examples and tutorials on the web that might help you.

  • Problem with the run_job,shell script with sqlldr

    Hi Gurus,
    I Created a job which calls the shell script and i understood from the other posting this job is going to execute with nobody,
    I had done the below testing
    Test 1) Shell script calls the SQL file, this SQL file executes the procedure.
    Test 2) Shell script calls the sqlldr command.
    When i execute the Test cases with , dbms_scheduler Run_job procedure, Test1 is success but Test2 was failed
    When i execute the Test cases with, logging into box with owner of the shell & both test cases are successful.
    Parent folder & Shell files are given with 777 permissions. & the Oracle db is version 10.2.0.1.0.
    Error:
    STANDARD_ERROR="SQL*Loader-522: lfiopn failed for file (*.log)"
    Please provide me your inputs its bit urgent Thanks a lot for your help.
    Edited by: 926769 on May 23, 2012 2:27 PM

    First of all let's look at your environment ... a totally unpatched version of software that is so old it is in desupport mode. You should upgrade to a fully supported version but, if you can't, at least to 10.2.0.5.
    That said without seeing any of your code, or a listing showing permissions on the directory and files, there is insufficient information from which to help you.
    Please post ALL information required for us to understand what you are doing an your environment.
    But before I decided that NOBODY was doing anything ... I'd shell out to the server from SQL*Plus using the HOST command and verify that permissions are as you believe them to be. There is every reason to believe SQL*Loader is having an issue with your file as identified.

  • Do shell script with SED

    I've used this a lot and have never observed this behavior; if it's normal I must really not have been paying attention.
    If I have a file (/Q.txt) which contains
    cnow
    cis the time
    cto call
    and do this: do shell script "sed 's/c//' < /Q.txt"
    the result is
    now
    is the time
    to call
    which is what I would expect.
    HOWEVER, if use this approach:
    set T to "cnow
    cis the time
    cto call"
    do shell script "echo " & quoted form of T & "| sed 's/c//'"
    the result is
    now
    cis the time
    cto call
    (I can't use the global form, as that will remove other instances of "c")
    The only way I can think this will happen is if "echo" removes the returns from T; but looking at the output of echo by itself the result looks okay. And the paragraph count of that result is the same as for T.
    What dumb thing am I doing now?

    Your issue is with the newlines (or other invisible characters) that are getting used. When I copied your example script, it worked as expected (the first match is replaced on each line). I don't know why the Script Editor would use different newline characters, but you can see from the following example how SED works with various ones:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    -- use a FF as the newline
    set T to "cnowc" & (ASCII character 10) & "cis the timec" & (ASCII character 10) & "cto callc"
    do shell script "echo " & quoted form of T & "| sed 's/c//'"
    --> correct
    -- use a CR as the newline (same as 'return')
    set T to "cnowc" & (ASCII character 13) & "cis the timec" & (ASCII character 13) & "cto callc"
    do shell script "echo " & quoted form of T & "| sed 's/c//'"
    --> same as your result
    -- the 'backslash-n' is a newline character that gets converted at compile time
    set T to "cnowc\ncis the timec\ncto callc"
    do shell script "echo " & quoted form of T & "| sed 's/c//'"
    --> correct
    -- replace all
    set T to "cnowc\ncis the timec\ncto callc"
    do shell script "echo " & quoted form of T & "| sed 's/c//g'"
    </pre>
    Since I can't see what you are using to generate the newlines (but they look the same), I am guessing that the wrong newline is getting placed in there. Copying from various sources may wind up with the different newline characters.
    Message was edited by: red_menace

  • Invoking shell script with mouse

    How to invoke a shell script on double clicking the script in graphcal mode?

    A couple of ways come to mind, but first make sure the script is executable:
    $ chmod 0755 script.sh
    and then:
    1) Move the file into ${HOME}/Desktop and it should show up on your background window. Right-click on its icon and make sure the "open with" pane uses the right shell interpreter. You should now be able to click on the script's desktop icon and see it run. Nautilus may ask if you want to run the script, run it in a terminal, or simply view it in an editor.
    or
    2) Move the shell script to a directory, perhaps ${HOME}/bin, and the right-click in one of the GNOME toolbars; I prefer the one at the top of the screen. Add to the panel a customer application launcher.
    HTH

  • Debug a shell script with awk problem

    Hi, Buddy,
    I try to run the below shell script which was borrowed from linux for load average check.
    #!/usr/bin/ksh
    # Set threshold for 1, 5 and 15 minture load avarage
    # configured for 12-processors system
    max_1=48
    max_5=36
    max_15=24
    # Set the string which appears before the load average in the uptime command
    load_text='load average: '
    #Email list
    mail_to=[email protected]'
    alert=n
    up=`uptime`
    # Parse out the current load average from the uptime command
    load_1=`echo $up | awk -F "$load_text" '{ print $2 }' | cut -d, -f1 | cut -d. -f1`
    load_5=`echo $up | awk -F "$load_text" '{ print $2 }' | cut -d, -f2 | cut -d. -f1`
    load_15=`echo $up | awk -F "$load_text" '{ print $2 }' | cut -d, -f3 | cut -d. -f1`
    # Set alert=y if any of the average are above their thresholds
    if [ $load_1 -ge $max_1 ]
    then
    alert=y
    elif [ $load_5 -ge $max_5 ]
    then
    alert=y
    elif [ $load_15 -ge $max_15 ]
    then
    alert=y
    fi
    # Send mail if the alert threshold was reached
    if [ ! $alert = n ]
    then mail -s "High load on `hostname`" $mail_to < `uptime`
    fi
    Now we run it in Solaris now, so when I run, can get error like
    $./monitor_load_average.sh
    awk: syntax error near line 1
    awk: bailing out near line 1
    awk: syntax error near line 1
    awk: bailing out near line 1
    awk: syntax error near line 1
    awk: bailing out near line 1
    ./monitor_load_average.sh[28]: test: argument expected
    ./monitor_load_average.sh[31]: test: argument expected
    ./monitor_load_average.sh[34]: test: argument expected
    I understand the problem, but stil a little difficult to edit awk clause to get right syntax, is there any buddy can help?
    Thanks a lot in advance.
    Jerry

    I don't have access to Solaris right now,but if i understand the [manpage |http://bama.ua.edu/cgi-bin/man-cgi?awk+1] correct , you can use only a character as field separator (-F), try to use /usr/xpg4/bin/awk instead, it is posix compliant version and should be mostly compatible to linux gawk.
    Besides that, you may probably find better support on unix/solaris forums with similar questions?
    Best regards
    Maxim

Maybe you are looking for

  • Development environment for 10g R2

    Guys, I need to setup a development environment for oracle 10g r2 forms development. I am a new to oracle and due to downsizing we lost our DBAs so I am on my own and need your huge support......... Current settings: Oracle on the server: Oracle 10g

  • Rebuilding an old G4 (pci)

    So far, everything is falling into place, too. MacMall has the PC-100 memory I need to max it out and a Mac-to-VGA adapter so I don't have to use that bloody huge monitor that comes with it (anybody wanna buy a monitor as big as an original imac?). H

  • Installation Will not continue SUSE ES 10 SP1

    I am running into a problem when I attempt to install the Oracle 10G R2 client on a SUSE 10 SP1 box. I keep getting the below messages when attempting to install. I am fresh out of ideas how to correct this. INFO: genclntsh: Failed to link libclntsh.

  • Access Level - LOV

    Hi Everybody Can any one tell what does the below 'Access Level' mean. I came across this in 'Resource Group' creation form. 1. User 2. Extensible 3. System Raffath

  • Can we copy standard buisness area folders to customise business area folde

    hai, I want to copy standard business area folders to customise business area folders.How I have to link AP_PO_INV and how many folders i will get in customise business from ap,po and inv.what are they. Thanks