10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is it possible to declare an array in the following way:
@tmp = (@f,"String1","String2", "String3",@f);
I'm getting the following error message:
Array found where operator expected at Program.pl line 181, near ""
(Missing semicolon on previous line?)
---------- Post updated at... (1 Reply)
Discussion started by: WongSifu
1 Replies
2. Shell Programming and Scripting
I get an error in my shell script that line 1: )unexpected.
Line 1 in my script (using sh by the way) is the variable I declared but did not initialize it.
result=
Is this wrong? How can I fix it? I am using the variable later in the program, so I figured I could just declare it first... (4 Replies)
Discussion started by: itech4814
4 Replies
3. Programming
if i declare both but don't input any variables what values will the int array and file pointer array have on default, and if i want to reset any of the elements of both arrays to default, should i just set it to 0 or NULL or what? (1 Reply)
Discussion started by: omega666
1 Replies
4. Shell Programming and Scripting
I know that directly we can assign a string to a variable but is there any other way to declare a variable as string type. I am using tcsh shell where I am using a function which would return a value of string type but when I am using return keyword , it is returning only integer value.pls help. (3 Replies)
Discussion started by: maitree
3 Replies
5. Shell Programming and Scripting
I am reading a number of files but then I want to put the ranges
xmin xmax ymin ymax
as arrays for each file.
Any idea how I can do this???
set j = 1
echo "Welcome $i times"
while ( $j <= $i )
echo "$j"
set fname = $fin-bst-misf.xy
echo " "$fname
... (0 Replies)
Discussion started by: kristinu
0 Replies
6. Programming
Hey guys im facing a problem in declaring variables. i have a few classes like the one below...
#ifndef _FINANCE_H
#define _FINANCE_H
#include <string>
#include <iostream>
#include <fstream>
#include <stdlib.h>
using namespace std ;
class readStraitsTimesIndex
{
... (3 Replies)
Discussion started by: gregarion
3 Replies
7. Shell Programming and Scripting
Hi guys. i have the following script:
1 #!/bin/bash
2 linkcount=$(grep "/portal" tickets | wc -l)
3 grep "/portal" tickets > links
4 for i in $(seq 1 $linkcount); do
5 echo "BLYAT"
6 let link$i=$(sed -n "$i"p links)
7 echo $
8 done
the problem is, that "let" can`t... (1 Reply)
Discussion started by: neverhood
1 Replies
8. Shell Programming and Scripting
I have an extraordinary problem with a csh script.....(feel free to berate the use of this but I'm modifying an existing bunch of them)
Anyway, I have a master csh script which in turn calls a second csh script. This second csh script is below. Within this second script are two compiled C++... (1 Reply)
Discussion started by: pollsizer
1 Replies
9. Shell Programming and Scripting
Hi all,
It might seem like a very trivial question but I am new to shell scripting so excuse for that.
I have an existing script in CSH. I need to create a function in the script which takes some parameters and returns a result. Can someone please let me know the syntax for function... (4 Replies)
Discussion started by: tipsy
4 Replies
10. Shell Programming and Scripting
I have some function
function()
{
fileNamelist=( `find Uploads -name "somePattern" | tr '\n' ' '` )
}
but "local fileNamelist" makes it variable.
How do I declare fileNameList as a local array in BASH? (1 Reply)
Discussion started by: ksh
1 Replies