Search Results

Search found 138 results on 6 pages for 'ksh'.

Page 1/6 | 1 2 3 4 5 6  | Next Page >

  • home, end, delete, pageup, pagedown with ksh

    - by Nicolas
    Hello. I want to use home, end, delete, pageup, pagedown with ksh. My TERM is xterm-color. These keys works fine with tcsh and zsh, but not with ksh (print a tilda ~) I found this: bind '^[[3'=prefix-2 bind '^[[3~'=delete-char-forward bind '^[[1'=prefix-2 bind '^[[1~'=beginning-of-line bind '^[[4'=prefix-2 bind '^[[4~'=end-of-line But when I set one bindkey, the last does not work anymore. How can I use these keys in ksh with a .kshrc ? Thanks.

    Read the article

  • dynamically allocating space for variable in ksh

    - by Govind Rajan
    I am new to ksh unix shell scripting.I need my ksh script to get inputs from the user. and the number of inputs is unkown. I need to get the inputs and process again further .The sample run could be : Enter the input values : Hello how are you Select two values from the above : how you Here the italized text are the inputs from the user.The inputs number given by the user is unknown .I down know how to handle the values given by user. Thanks in advance

    Read the article

  • KSH shell script won't execute and returns 127 (not found)

    - by Chris Knight
    Can anyone enlighten me why the following won't work? $ groups staff btgroup $ ls -l total 64 -rw-rw---- 1 sld248 btgroup 26840 Apr 02 13:39 padaddwip.jks -rwxrwx--- 1 sld248 btgroup 1324 Apr 02 13:39 padaddwip.ksh $ ./padaddwip.ksh ksh: ./padaddwip.ksh: not found. $ echo $? 127 This is nearly identical to another script which works just fine. I can't see any differences between the two in terms of permissions or ownership. thanks in advance!

    Read the article

  • ksh Auto-Completion PuTTY Configuration

    - by Nitrodist
    I'm having a bit of a problem configuring my PuTTY client to work with the auto-completion feature in the ksh shell. I do a listing on the root with the directories /home and /homeroot and it returns the directories in a list just fine. I can't select it, though, by hitting X = (where X is the number). /home/nitrodist>ls /h #hits esc + = 1) home/ 2) homeroot/ #hits 2 + = for the 'homeroot' dir 1) home/ 2) homeroot/ #hits just the '=' key. 1) home/ 2) homeroot/ Any ideas? I've su -'d to another user who can actually do it with their PuTTY session and I can't do it there, which makes me think it's a PuTTY configuration issue. This is running on a ksh93 shell on HP-UX, if that makes any difference. Here's my ksh config: /home/campbelm>set -o Current option settings allexport off bgnice on emacs off errexit off gmacs off ignoreeof off interactive on keyword off markdirs off monitor on noexec off noclobber off noglob off nolog off notify off nounset off privileged off restricted off trackall off verbose off vi on viraw on xtrace off /home/campbelm>

    Read the article

  • Function behaviour on shell(ksh) script

    - by footy
    Here are 2 different versions of a program: this Program: #!/usr/bin/ksh printmsg() { i=1 print "hello function :)"; } i=0; echo I printed `printmsg`; printmsg echo $i Output: # ksh e I printed hello function :) hello function :) 1 and Program: #!/usr/bin/ksh printmsg() { i=1 print "hello function :)"; } i=0; echo I printed `printmsg`; echo $i Output: # ksh e I printed hello function :) 0 The only difference between the above 2 programs is that printmsg is 2times in the above program while printmsg is called once in the below program. My Doubt arises here: To quote Be warned: Functions act almost just like external scripts... except that by default, all variables are SHARED between the same ksh process! If you change a variable name inside a function.... that variable's value will still be changed after you have left the function!! But we can clearly see in the 2nd program's output that the value of i remains unchanged. But we are sure that the function is called as the print statement gets the the output of the function and prints it. So why is the output different in both?

    Read the article

  • disown a process in ksh

    - by fahdshariff
    The "disown" command works in bash, but not in ksh. If I have started a process in ksh, how can I "disown" it, so I can exit my shell. (I know about nohup, but the process has already started!)

    Read the article

  • bash/ksh/scripting eval subshell quotes

    - by jhon
    Hi tehere, I'm using ksh and have some little troubles, could you help me? why does not this code run? [root]$ CMD="ls -ltr" [root]$ eval "W=$( $CMD )" [root]$ ksh: ls -ltr: not found. [root]$ echo $W and this works fine: [root]$ CMD="ls -ltr" [root]$ eval 'W=$('$CMD')' [root]$ echo $W Thanks :-)

    Read the article

  • using sed to replace 1 line with a multi-line variable in ksh

    - by Manda
    I have the following text in a file: XXXX NNNN YYYY NNNN ZZZZ NNNN I want to replace the NNNN to make it look like this: XXXX NNNN DUTY FORECASTER: YYYY NNNN DUTY FORECASTER: ZZZZ NNNN DUTY FORECASTER: How do I use sed to replace a variable with more than one line? Is there a better way of doing this without using sed? I have tried the following to no avail: sed 's/NNNN/"$value1"/g' testfile sed 's/NNNN/'"$value1"'/g' testfile sed 's/NNNN/${value1}/g' testfile sed 's/NNNN/'"${value1}"'/g' testfile I have also tried all of the above using double quotes. Any help is greatly appreciated. Thanks so much!

    Read the article

  • ksh + printf stat gap of print

    - by yael
    need to print the follwoing: need smart way by printf to pring this example param1 ............... value1 param2 ............... value2 param3 ............... value1 param4 ............... value2 THX

    Read the article

  • A KSH adattárháza: Oracle Essbase és Oracle Database alapon

    - by Fekete Zoltán
    A magyar Központi Statisztikai Hivatal metaadat vezérelt adattárháza három fontos Oracle terméken nyugszik. Az interneten elérhetok az adatok a KSH Tájékoztatási adatbázis-ból. Data from KSH in English. Amikor ezeket a sorokat írom, péntek éjjel 21:36-kor 81 online felhasználó kérdezte le az adatokat. :) - Oracle Essbase multidimenziós OLAP szerver, technikai infó - Hyperion Interactive Reporting lekérdezo eszköz, technikai infó - Oracle Database Enterprise Edition Az angol nyelvu customer snapshot, azaz ügyfél történet: Hungarian Central Statistical Office Provides 200,000 External Users with Secure Online Access to Data. A magyar nyelvu sikersztori: A KSH statisztikai adatainak 60 százaléka elérheto böngészo és platform függetlenül évi mintegy 200 000 internetes felhasználó számára. A termék kiválasztásában, a projekt kialakításában és bevezetésében nagy szerepet vállalt a DSS Consulting Kft. és az Oracle Konzultáció. A projekt során elért legfontosabb eredmények: - adattárház: 150-200 egyideju felhasználó, éves szinten 200 000 felhasználót jelent - Essbase memória alapú tárolási struktúrája: közel valósideju hozzáférés - A rendszer platform és böngészo független, ezért a felhasználók széles köre érheti el a statisztikai adatokat. - Natív Java API és XMLA támogatással egyedi karbantartó alkalmazás - A statisztikus munkatársak speciális informatikai eloképzettség nélkül építik fel és gondozzák a multidimenzionális adatbázisokat - Az Oracle Hyperion Interactive Reporting: oszlopos, kereszttáblás, szekcionált, grafikonos, webes lekérdezések Letöltheto a következo KSH eloadás a HOUG konferenciáról 2009-bol: Hyperalea iacta est - a KSH Essbase alapú adattárház rendszere. A most megjelent sikersztori: angolul és magyarul.

    Read the article

  • ksh: assigning function output to an array

    - by rcarson
    Why doesn't this work??? #!/bin/ksh # array testfunc() function testfunc { typeset -A env env=( one="motherload" ) print -r $env return 0 } testfunc # returns: ( one=motherload ) typeset -A testvar # segfaults on linux, memfaults on solaris testvar=$(testfunc) # segfaults on linux, memfaults on solaris print -r $testvar I am sure this has been asked before, but I am not sure what to search on and everything I have been trying to use for keywords is not bringing me any answers that relate to my problem.

    Read the article

  • ksh: Iterate through a range

    - by sgreeve
    How can I iterate through a simple range of ints using a for loop in ksh? For example, my script currently does this... for i in 1 2 3 4 5 6 7 do #stuff done ...but I'd like to extend the range way above 7. Is there a better syntax? Thanks!

    Read the article

  • ksh : Need to delete multiple directories in parallel

    - by priya
    Hi , I have many directories and need to delete them periodically with minimum time. Additionally for each directories delete status need to know i.e whether deleted successfully or not. I need to write on the ksh . Could you please help me out. The sample code which I am using is not working. for var1 in 1...10 rm -rf & pid[var1]=$! done my_var=1 for my_var in 1...var1 wait $pid[my_var] if [ $? -eq 1 ] then echo falied else echo passed fi done

    Read the article

  • Getting past dates in HP-UX with ksh

    - by Alejandro Atienza Ramos
    Ok, so I need to translate a script from a nice linux & bash configuration to ksh in hp-ux. Each and every command expects a different syntax and i want to kill myself. But let's skip the rant. This is part of my script anterior=`date +"%Y%0m" -d '1 month ago'` I basically need to get a past date in format 201002. Never mind the thing that, in the new environment, %0m means "no zeroes", while actually in the other one it means "yes, please put that zero on my string". It doesn't even accept the "1 month ago". I've read the man date for HP-UX and it seems you just can't do date arithmetic with it. I've been looking around for a while but all i find are lengthy solutions. I can't quite understand that such a typical administrative task like adding dates needs so much fuss. Isn't there a way to convert my one-liner to, well, i don't know, another one? Come on, i've seen proposed solutions that used bc, had thirty plus lines and magic number all over the script. The simplest solutions seem to use perl... but i don't know how to modify them, as they're quite arcane. Thanks!

    Read the article

  • REDUX: How to overcome an incompatibility between the ksh on Linux vs. that installed on AIX/Solaris

    - by Andrew Stein
    I have uncovered another problem in the effort that we are making to port several hundreds of ksh scripts from AIX, Solaris and HPUX to Linux. See here for the previous problem. This code: #!/bin/ksh if [ -a k* ]; then echo "Oh yeah!" else echo "No way!" fi exit 0 (when run in a directory with several files whose name starts with k) produces "Oh yeah!" when called with the AT&T ksh variants (ksh88 and ksh93). On the other hand it produces and error message followed by "No way!" on the other ksh variants (pdksh, MKS ksh and bash). Again, my question are: Is there an environment variable that will cause pdksh to behave like ksh93? Failing that: Is there an option on pdksh to get the required behavior?

    Read the article

  • KSH: Variables containing double quotes

    - by nitrobass24
    I have a string called STRING1 that could contain double quotes. I am echoing the string through sed to pull out puntuation then sending to array to count certain words. The problem is I cannot echo variables through double quotes to sed. I am crawling our filesystems looking for files that use FTP commands. I grep each file for "FTP" STRING1=`grep -i ftp $filename` If you echo $STRING1 this is the output (just one example) myserver> echo "Your file `basename $1` is too large to e-mail. You must ftp the file to BMC tech support. \c" echo "Then, ftp it to ftp.bmc.com with the user name 'anonymous.' \c" echo "When the ftp is successful, notify technical support by phone (800-537-1813) or by e-mail ([email protected].)" Then I have this code STRING2=`echo $STRING1|sed 's/[^a-zA-Z0-9]/ /g'` I have tried double quoting $STRING1 like STRING2=`echo "$STRING1"|sed 's/[^a-zA-Z0-9]/ /g'` But that does not work. Single Qoutes, just sends $STRING1 as the string to sed...so that did not work. What else can I do here?

    Read the article

  • Is it possible to view the "source" for a ksh function?

    - by stevec
    Our ksh environment defines several functions, which can be listed using then "functions" ksh function. Is it possible to see the definition (ie source code) for these functions? This seems like an obvious question, but I've tried all manner of parameters to the "functions" and "function" functions with no luck. Thanks, Steve

    Read the article

  • How to create a new background process in a KSH "while read" loop?

    - by yael
    The following test script has a problem. When I add the line (sleep 5 ) & in the script then the "while read" loop does not read all lines from the file, but only prints the first line. But when I remove the ( sleep 5 ) & from the script, then the script prints all lines as defined in the file. Why the ( sleep 5 ) & causes this? And how to solve the problem? I want to create a new process (for which the sleep is just an example) in the while loop: $ more test #!/bin/ksh while read -r line ; do echo Read a line: echo $line ( sleep 5 )& RESULT=$! echo Started background sleep with process id $RESULT sleep 1 echo Slept for a second kill $RESULT echo Killed background sleep with process id $RESULT done < file echo Completed On my Linux, when using the following contents of file: $ more file 123 aaa 234 bbb 556 ccc ...running ./test just gives me: Read a line: 123 aaa Started background sleep with process id 4181 Slept for a second Killed background sleep with process id 4181 Completed

    Read the article

  • How do I return a perl variable to a .ksh script?

    - by Dave
    I have a .ksh script that calls a perl pgm. The perl pgm creates some important data that the .ksh script needs to act on. Example: .ksh pgm #!/usr/bin/ksh abc.pl > $logFile # perl pgm creates variable $importantData See below. # HOW DO I GET THE .KSH SCRIPT TO SEE $importantData ??? def.ksh $importantData # send important data to another .ksh script exit . Perl pgm $importantData = somefunction(); exit;

    Read the article

1 2 3 4 5 6  | Next Page >