/bin/ksh

Howzit Folks?We don't have /bin/ksh in our USS setup, is there a way I can override this or work around it without creating a symbolic link or installing the korn shell? ...

Oracle sub: /usr/bin/ksh: sqlplus: not found.

I installed Oracle 9R2 client on one server and i'm not able to execute sqlplus command it's throwing following error's :oracle:/home/oracle#sqlplus/usr/bin/ksh: sqlplus: not found.:oracle:/u01/app/oracle/product/9.2.0#sqlplus/usr/bin/ksh: sqlplus: 0403-006 Execute permission denied.then i gave 777 ...

using mysql inside a ksh script

this is undoubtedly a really newby thing to ask but..... I am trying to run mysql from inside a ksh (shown below) ======================== #!/usr/bin/ksh mysql <<!! use 'test' create table blocktypes (typeid SERIAL not null, typename (char20) ); \q !! exit ======================== It seems to ...

bug for su command or ksh?

Really need some aix gurus to help me on this issue, here is the scenario. Running AIX53TL07SP1 or AIX53TL07SP4, all run by root. 1. Create a K-shell script called su-test under /tmp as below, change to excutable after vi.#!/usr/bin/ksh/usr/bin/su - users2. go to /tmp and run the script../su-testsom ...

script getting error ""/usr/bin/mv: 0403-027 The parameter list is too long

Please can anyone help to enhance below scripts.I getting "/usr/bin/mv: 0403-027 The parameter list is too long" error when executing below script.So i have tired to change ulimit -f to unlimited but still same .Some people suggested to use xargs but I'm not sure how to apply in my script. ######### ...

Who added signal handlers to /bin/sleep in AIX 6.1 ?

This is really silly; why would IBM change base functionality like this?sleep 100000 & 1234kill 1234SIGTERM is ignored.kill -6 1234dbx /bin/sleep core(dbx) proc signal(3) QUIT: SIG_IGN(15) TERM: SIG_IGNWhich means a script like this cannot be killed with the default TERM signal.#!/bin/kshtrap "e ...

bug for su command or ksh?

Really need some aix gurus to help me on this issue, here is the scenario. Running AIX53TL07SP1 or AIX53TL07SP4, all run by root. 1. Create a K-shell script called su-test under /tmp as below, change to excutable after vi.#!/usr/bin/ksh/usr/bin/su - users2. go to /tmp and run the script../su-testsom ...

bad interpreter: No such file or directory

Hi, I am a linux newbee, using fedora core 5.I get the following message when I try to run a simple test script. The same script runs on another machine very similar to my own. ./mydate: /bin/bash^M: bad interpreter: No such file or directoryThe file does has execute rights. ...

Need help with printing arrary in Ksh

I am trying to (echo ls -l $i) but it's not printing if someone can help me....I am trying to ls -l everything in the arrary....Thanks in advancescript: #/usr/bin/kshtypeset -i cnt=0while read linedomyarray[$cnt]=$line((cnt = cnt + 1))done < myfilefor i in ${myarray[*]i}; doecho `ls -l $i`donedat ...

sqlplus script in UNIX KSH question

I have a sqlplus script that I want to run in the background as a cron job. However when the below script runs, it brings up sqlplus screen output. How can I get this to run silently ? Thanks!#!/usr/bin/ksh# dev1.shsqlplus /nolog<<ENDOFSQLconnect user/password@dev@dev1.sqlexitENDOFSQLWhat I am ...

ksh scripting solaris..newbie prob

I'm trying to make the below script work!!The output of the sybase part of the script wpuld be as below(note the space in first position and a blank line at the end)"jackson michaelpresly Elvis"#!/bin/kshtmp1=`$SYBASE/bin/isql -Usa -Psybase << EOF | tail +3 |grep -v affected use cust ...

If comparisons in ksh

I am converting a program from csh to ksh and having a lot of problems with the if statements.here is the the basic program with the problem #!/bin/ksh##set nohupset noclobber notify#tput clearecho " "echo -n "Enter Your CHOICE :"read CHOICEif (-n"$CHOICE") thenecho ...

KSH Passing parameters that start with $

I'm completely new to this and have fallen at the first hurdle. I'm only playing so its not urgent.Here is my little bit of code:#!/bin/kshprint Content-type: text/htmlprintprint '<pre style=font-family:Fixedsys>'gtacl -c 'files $usvol1.ssdxl' |{while read line ;doprint "${line%%=*}" ...

ksh scripting

I have found a script which does password changes on multiple machines without installing additional packages which is what I need. Problem is it uses telnet and ftp. I need to modify this to use ssh and scp. Any help greatly appreciated.Thanks#! /usr/bin/ksh# changepass --- change the user's passwo ...

I need help with .ksh script to REORCHK and output only Recommended tables to a file.

I am comming along with all this Linus/DB2/scripting business...I am no longer scared of it!! (LOL). But,I need to create a .ksh script that does a REORGCHK and output only tables recommended for reorg.My goal is to reorgchk and run reorgs based on entries in this reorg file as shown in the example ...

strange parameter passing issue in KSH

here is the thing i am trying to do . I have a system variable called $OOCEA_INCOMING_READY, I want to be able to construct this variable name inside the script and use it. I am passing part of the variable name OOCEA as parameter but i am not able to use this variable after constructing the name , ...

GNU ccRTP installation error(bad interpreter ??)

I am using OpenSuSE 11.0. Today I downloaded GNU ccRTP software and tried to install it. I went inside the directory and typed ./configure to start the installation process as told in the "readme" and "install" file. Bur I got the following error :bash: ./configure: /bin/sh^M: ba ...

Ubuntu KSH - script not running

I've got a script, called ideploy_wrap.sh, to run with KSH that looks like this:#!/usr/bin/ksh#set -xprogram_dir=`dirname $0`cd ${program_dir}. ${program_dir}/ideploy.inc#########################################etcetcetcThe automatic installer tries to run it and receives the following error:No such ...

Ksh script problems

I'm trying to migrate some scripts from our old Solaris box to a new Linux box running Red Hat. I'm getting some weird problems. For example:>lshtml_creation.ksh>. ./prod/scripts/html_creation.ksh: not foundscripts/html_creation.ksh[6]: datethis is weird to me, because the script is something ...

Need help with KSH script

I am a newbie for ksh scripting.My code doesn't work. I am trying to automate the process of file read from a directory. The files older than 3 days are supposed to be archived. If they are in the three day limit, then they can be processed as a comand line to a C program.Here is the script:#!/bin/k ...

How can we redirect std err and std ouput in KSH

I am working on Shell script but on Solaris server (/bin/ksh is default) and not able to redirect the Std Err and Std Output to a file..following is my codessh hostname | grep "omega" /home/ >& test.lognothing is going in test.log ...

ksh head/tail argument variable

I am trying to run head or tail command from externa argument as below.for example test.shand run ./test.sh 1000------------------#/bin/kshprint "fred: $*"print "$0: $1 and $2"print "$# arguments"head -$1 /u01/scripts/dump*|grep sessio|awk '{ print $1`}> /u01/out.txt ...

Need help combining two ksh scripts

I have two scripts on a production solaris box to check and clear the print queue. I want to combine these to make my job a lot easier. I always script in python, but this machine doesn't have it and I don't have rights to install it. Any help on putting these two together will be greatly appreciate ...

ksh variable help

This is my first attempt at linux shell scripts. Me being me, I don't start with "hello world."What I want to do is call a program and pull out info from the stdout results. The first problem seem to be that the newlines are stripped out at some point. This works:#! /bin/kshMYVAR="Hel ...

ksh: how do i find filename if $0=-ksh

> ksh ./myKshScript$0=./myKshScript> ./myKshScript$0=./myKshScriptBUT> . ./myKshScript"$0=-kshHi Folks,When running a ksh script using a dot instead of /bin/ksh, $0 is set to -ksh. Is there another way to get the filename? Eg. Syntax errors are reported with the full filename so the in ...

problem to use an alias in the ksh functions

I have problem to use an alias that defined in ksh93 script, in the functions in the same script onm Linux. I definied an alias in main: alias echo='echo -e' in order that echo will read backslashes but when i executed it in function, the alias didnt work, and performewd a regular echo, without -e - ...

I was not able to change shell from sh to ksh in ubuntu 9.04

I used chsh -s /bin/ksh and chsh -s /usr/bin/ksh and also i tried with chsh alone. but its telling ksh not found. but when i gave echo $SHELL command it shows /bin/ksh and /usr/bin/ksh in the list.please help me to resolve this. ...

Ubuntu No interpreter found - php

I don't know if this should be here or server stuff.I'm trying to get php5 to work through a script, but I get the following error-bash: ./test_file.php: /user/bin/php^M: bad interpreter: No such file or directoryI have installed php5 and php5-cliIf I do whereis php5 I getphp5: /usr/bin/php5 /etc/ph ...

javascript with ksh

Can you execute a ksh script within javascript? Inside my js function I havewindow.open("http://myhomepage.com:12345/Home/bin/ksh/" "Page Name", width=470,height=452");ksh script should return output which the js function should display. ...

Ubuntu Python "bad interpreter" Karmic

Hmph! What's up with my computer snake?Here's a wee script:#!/usr/bin/python#print "Hello world"And here's what happens when I run it (my prompt is Go: )Go:./mypython.py bash: ./mypython.py: /usr/bin/python^M: bad interpreter: No such file or directoryGo: ...

Ubuntu Perl bad interpreter: No such file or directory

Running Ubuntu 9.10 and Perl This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multiError:root@lserver:/usr/local/bin# ./bktar.plbash: ./bktar.pl: /usr/bin/perl^M: bad interpreter: No such file or directoryroot@lserver:/usr/local/bin# How to make this work??John, ve3dvv:o ...

Ubuntu ksh question

HiI've come across this piece of ksh code that I couldn't quite figure out. Can someone shed a little light on the 'if ${' bit?Is there a mistake here, a bit missing or something I don't know about?ThanksPeter-----------------------------------------------------#!/bin/ksh# Parse the command-line opt ...

Ubuntu Dangers of remapping /bin/sh

So, I've finally got my system up and running using dmraid to make the software-raid work properly, and building 9.04 up mostly from the command-line (the installer barfs when I try to install with / mapped to /dev/mapper/isw_ceeaabjdha_store1). The point is, the install has taken a while and I don' ...

Oracle ksh script help

I try to run the following scirpt, but it failed in the bolded area, it says:loadAtcorStaticParameter.ksh[17]: syntax error: `while' unmatched#!/bin/kshPW=$1shift# 1. check diskspace under dba# 2. truncate table, reset sequence# 3. get current time# 4. loop# 5. connect, insert, exit# 6. get current ...

Oracle How to pass variable to SQLPLUS in a ksh script?

I am writing a ksh script which will use sqlplus to run a sql and pass 2 variables as the SQL request. In the ksh script, I have 2 variables which are $min_snap and $max_snap holding 2 different numbers.Inside the same script, I am using SQLPLUS to run an Oracle SQL script, which request to enter 2 ...

Oracle ksh script - Logical Full DB Backup - Crontab

The Environment is:OS - Solaris 10RDBMS - Oracle 10.2Issue:Unable to run Logical Backup Script Using Crontab.Settings:As Oracle user, I created script in /export/home/oracle/bin/test.shScript Contains:#!/bin/kshexport ORACLE_HOME=/u01/app/oracle/product/10.2.0export ORACLE_SID=TESTexp system/***@TES ...

Ubuntu ./configure bad interpreter

I tried to install open1x on my ubuntu 7.10, but when I type "./configure" it replies:bash: ./configure: /bin/sh^M: bad interpreter: No such file or directoryboth normal user and root."ls -l |grep ./configure" replies:-rwxr-xr-x 1 niko niko 205041 2007-08-13 15:15 configure-rw-r- ...

Ubuntu uninstall ksh

first time, I have installed ksh but later decided to uninstall it as it might interfere with pdksh. I have uninstalled it from synaptic package manager. But when I try to install another software whihc require pdksh, there is warning saying that I need to uninstall ksh. When I find the ksh using wh ...

Ubuntu ksh programming

I'm banging my head on my desk. I'm a VB/Java/Oracle programmer being thrust into the Unix world and I need to learn Korn shell programming (I'm working through the Rosenberg book).I have a few questions I'm hoping you can help me out with.1. vi is just pure evil, isn't it? ARRRGH!! :mad:2. I instal ...

Ubuntu "bad interpreter - no such file or directory"

I'm trying to run a shell script, and it's not working. jayzilla@server1:~/roborumble/robocode$ ./roborumble.shbash: ./roborumble.sh: /bin/sh^M: bad interpreter: No such file or directoryAny ideas? ...

xml extender install problem.

I'll try to be as descriptive as possible...I'm running RedHat 7.3, and I'm trying to install DB2 XML Extender, and db2 is currently working like a charm.I got the RPM to install AOK, but... there's some post installation steps that need to be done to get the extender working. The first of these ste ...

ldapxcfg fails

I chose to run IBM Directory Server 4.1 w/ WebSphere 5.0 on RedHat 8.0. I am running into problems trying to configure the directory server. Everytime I type in ldapxcfg I recieve the error "bin/ksh bad interpreter: cannot find file or directory" ...

Oracle what is the problem when try run this shell script?

when I try to run a check_alert_log.ksh (proved running well in sun box) in a Redhat Linux box, I always got error like:: bad interpreter: No such file or directoryat the beginning of the scripts, it is #!/bin/kshand when I go to /bin, I can find /ksh under that directory. so seems it is not that pr ...

Ubuntu File Permissions

There is a file that I can not executethis file is under /usr/local/opt/msc/bin-rwxr-xr-x 17 root root 11420 2004-07-28 15:18 nastran.When trying to execute ./nastran, I getbash: ./nastran: /bin/ksh: bad interpreter: No such file or directory since I have owner and group permissions as root, I think ...

Ubuntu lost without a traces...

I downloaded the Sun Java System Active Server Pages 4.0.2 and i am going out of my mind trying to install this thing without a clue.First, this is what i am trying to do. I have installed the apache2 and rebooted pc. dont ask me why- old windows habits.After that i browsed my local host to see if t ...

Db2 Procedure FileOutput

I am able to create a procedure which calls a external C program, as explained below for creating Flat File output from a DB2 Procedure. #include<stdio.h> FILE *fp; void output_file(char filename[30],char str[150]) { fp = fopen(filename,"a+"); fprintf(fp,"%s",str); fclose(f ...

AIX / csh Shell / navigation with backspace, arrows / history

It is my first contact to AIX, it is a SAP Installation. The System + SAP has been installed by other's... Root User Shell is ok, using /usr/bin/ksh and everything is working well, the SAP User is defined to use /usr/bin/csh (no Change possible..)Under the SAP User, the Shell is extremly boring: It ...

/usr/lib/security/mkuser.default parameters not showing in smit user Add User

Everything appears to look good in the mkuser.default file but when I 'Add User' from smit user, the defaults for pgrp, groups, shell, & home don't appear.Any ideas??I have set up asuser:pgrp = infogroups = info,staffshell = /bin/kshhome = /home/$USERLet me know if you need more info. ...

Changing Effective Group Within a Script

Hello,Looking for a way either by using "newgroup"or "setgroups" command in a script to change the effective group other then your default group "gid" and create files/dir. Since "newgroup" and "setgroups" spawns a new shell is not working. Any suggestion.Example#!/bin/kshsetgroups -r <groupname ...

Error in FTP script

Hi, I am trying to use one ftp script which was written in UNIX, in AIX. When I try to execute the script, I am getting an error like the following.Unknown option-T. ftp -n -i -T 3 $host_name 1>>$Ftperr_Filename 2>&1 << FTPBLOCK1This is the command, in which it is throwing the err ...