The way I've been using arrays currently have been:
#!/bin/ksh
set -A myArray
myArray=value1
myArray=value2
myArray=value3
myArray=value4
Is there a way I can assign values to an array that will automatically place the value into the next element in the array like:
myArray=value1... (4 Replies)
i try to get the year and month values using the below shell script
when i enter the script like this
#!/usr/bin/ksh
dd=`DATE +%Y%M`
echo $dd
it is showing the error as shown below
abc.ksh: DATE: not found
any suggestions please (3 Replies)
I have a file like this:
Tue Apr 15 10:41:47 MDT 2008 FINAL RESULT; 6
Tue Apr 15 10:41:47 MDT 2008 FINAL RESULT; 2
Tue Apr 15 10:41:47 MDT 2008 FINAL RESULT; 5
With this command seira=`cut -f 2 -d ';' tes.txt` i take all the results (6,2,5 etc) and i store them in variable seira
When i do... (9 Replies)
hi every body,
i donot know how to assign a array varible with a file
see i having file
more file
property1 Name
property2 Address
the above two line are tab Space seperated between the property and its value
i want to seperate it and assign to... (1 Reply)
I need to do something like this:
for i in 1 2 3 4 5; do
arr=$(awk 'NR="$i" { print $2 }' file_with_5_records)
done
That is, parse a file and assign values to an array in an ascending order relative to the number of record in the file that is being processed on each loop.
Is my... (2 Replies)
I have written a shell script to do some processing and have to manipulate a variable. Basically, the variable is like this --
var=set policy:set cli
My purpose is to split it into two variables based on the position of ":". To get the right end, I am doing this --
vaa1=${vaa#*:}
... (1 Reply)
Hi! This might be a simple thing, but I'm struggling to assign values to variables from the file.
I've the following values stored in the file.. It consists of only two rows..
10
20
I want to assign the first row value to variable "n1" and the second row value to variable "n2"..
That is ... (3 Replies)
Hi,
I have a single column of numbers from in tabulated text format ranging from 0 to 1. I want to manipulate the list of numbers so that if the number is greater than 0.5 (> 0.5), I get 1 - number. If the number is less than 0.5, the number is taken as it is and not altered. For example:
... (1 Reply)
Hi, I was wondering if anyone could assist me for (what is probably) a very straightforward answer.
I have input files containing something like
File 1
Apples
Apples
Apples
Apples
File 2
Bananas
Bananas
Bananas
Bananas (4 Replies)
Hi All,
Is it possible to grep for two files and assign their names to two separate variables with for loop? I am doing the below currently:
if
then
for fname in $( cd $dirA ; ls -tr | grep "^Ucountry_file$")
do
InFile=$dirA/$fname
... (4 Replies)
Discussion started by: swasid
4 Replies
LEARN ABOUT DEBIAN
monsterz
MONSTERZ(1) User Commands MONSTERZ(1)NAME
monsterz - a puzzle game of monsters
SYNOPSIS
monsterz [OPTION]...
DESCRIPTION
Options
-h, --help
display this help and exit
-v, --version
display version information and exit
-f, --fullscreen
start in full screen mode
-m, --nomusic
disable music
-s, --nosfx
disable sound effects
--outfd <fd>
output scores to file descriptor <fd>
--data <dir>
set alternate data directory to <dir>
--score <file> set score file to <file>
AUTHOR
Written by Sam Hocevar, music by MenTaLguY, sound effects by Sun Microsystems, Inc., Michael Speck, David White and the Battle for Wesnoth
project, Mike Kershaw and Sam Hocevar.
REPORTING BUGS
Report bugs or suggestions to <sam@zoy.org>.
COPYRIGHT
Copyright (C) 2005, 2006 Sam Hocevar <sam@zoy.org>
(C) 1998 MenTaLguY <mental@rydia.net>
(C) 2002, 2005 Sun Microsystems, Inc.
(C) Michael Speck <kulkanie@gmx.net>
(C) 2003 by David White <davidnwhite@optusnet.com.au> and the
Battle for Wesnoth project
(C) Mike Kershaw <dragorn@kismetwireless.net> This program is free software; you can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/ for more
details. The sound effects are released under their own licences: applause.wav and pop.wav are covered by the LGPL, the others are covered
by the GPL.
SEE ALSO
The in-game help option.
monsterz 0.7.0 October 2007 MONSTERZ(1)