I'm attempting to populate an array in ksh using the following command:
set -A $(SELECT_INVOICE | sed '/^$/d')
SELECT_INVOICE is a function that executes the SQL query.
Problem: Some of the invoice numbers have alpha characters with spaces(example: OVEN MICRO). The Korn shell is treating... (1 Reply)
I read it is possible to provide values for an array with the -A option to the read statement; however, I have not been able to get this to work. When I execute a script with the -A option to the read statement, the shell complains that it is an illegal option. If this works, can someone provide... (5 Replies)
I want to be able to generate a random number within a korn shell script..
Preferably i would like to be able to state how many digits should be in this random number... ie 4 digits or 5 digits etc
Any ideas? (2 Replies)
Hello,
I'm currently messing around with arrays for the first time in scripting (Unix Korn Shell). All I'm trying to do right now before I make things complicated is read through and print out to screen whether the read file is or is not a directory.
Here is my directory:
ls -l
total... (5 Replies)
I have a script that contains
#!/usr/bin/ksh
set -A X 'hallo' 'world'
echo ${X}
echo ${X}
when I execute it I get an errror message
sh ./test.ksh
./test.ksh: -A: bad option(s)
but if I do this at the command prompt I am able to create it
set -A myarray '1' '2' '3'
echo ${myarray}... (4 Replies)
Hi,
I am trying to run a process through inetd using ksh.
The entry in /etc/inetd.conf is
Process_Name tcp nowait root /home/user/script script
The script is as follows
/usr/bin/ksh -c /path/process
Recycling inetd services is successfully completed.
But when the process is accessed... (8 Replies)
I have a korn shell script that reads a file with just one column in the file. If the file has more than 5 entries it is split using split -5. This means that is we have 15 entries I will end up with 3 files with 5 entries/lines in each and if I have 23 entries I will end up with 5 files with the... (2 Replies)
I have a text file with several key words that I am trying to isolate. I have grepped for the unknowns in the text file, but each unknown has a corresponding location. I have created an array that holds all the unknowns and another array that holds all of the locations and compares them based on... (12 Replies)
In order to use the shellcurses functions described at:
Shell Curses function library
I am learning about ksh, which has arrays. My trusty Kochan & Wood book says that for any Korn Shell array AR :
${AR
} expands to all the defined array elements, and
${#AR
} expands to the number... (3 Replies)
Hi,
I have one array created and some values are there in ksh. I want to append some other values to it based on some condition in if statement.
#!/bin/ksh
echo "---------------------------------------------------"
set -A ipaddr_arr $(egrep -v '^#|^::|^$' /etc/hosts |awk '{print $1}'... (2 Replies)
Discussion started by: sanzee007
2 Replies
LEARN ABOUT NETBSD
set_color
set_color(1) fish set_color(1)NAME
set_color - set_color - set the terminal color
set_color - set the terminal color
Synopsis
set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR]
Description
Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple,
cyan, white and normal.
o -b, --background Set the background color
o -c, --print-colors Prints a list of all valid color names
o -h, --help Display help message and exit
o -o, --bold Set bold or extra bright mode
o -u, --underline Set underlined mode
o -v, --version Display version and exit
Calling set_color normal will set the terminal color to whatever is the default color of the terminal.
Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey
font color, while set_color --bold white will result in a white font color.
Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator.
set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and
incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of
ncurses and recompile fish against it in order to fix this issue.
Version 1.23.1 Sun Jan 8 2012 set_color(1)