10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I have a table that looks like what is shown below:
AA
BB
CC
XY
PQ
RS
AA
BB
CC
XY
RS
I would like the total counts depending on the set they belong to:
if search pattern is in {AA, BB, CC} --> count them as Type1 | wc -l (3 Replies)
Discussion started by: Gussifinknottle
3 Replies
2. Shell Programming and Scripting
Hello.
I am trying to modify a config file which is in windows *.ini type file.
I have found a piece of code here :linux - Edit file in unix using SED - Stack Overflow
As I can't make it doing the job , I am trying to find a solution step by step.
here a modified sample file : my_sample.ini... (1 Reply)
Discussion started by: jcdole
1 Replies
3. Shell Programming and Scripting
Hi All,
I have a an array, in which i need to loop through all the variable and check each variable individually for a pattern.
For ex
#!/bin/ksh
set -A FileNames $(</Temp/AllNames)
echo "Total array elements :" ${#FileNames
}
for i in ${FileNames}
do
# if the "${i} | grep Last"... (3 Replies)
Discussion started by: baranisachin
3 Replies
4. Shell Programming and Scripting
Does anyone know how to declare an array in csh? I don't want to declare any elements in the array because I have a variable that represents the size of the array. For example: the array I want to declare is called sortList and it passes in the variable ARRAYSIZE that stores the value 8. (1 Reply)
Discussion started by: demet8
1 Replies
5. 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
6. Shell Programming and Scripting
ENV varibles set using a script are not retailed once the script execution is done. But if the same ENV variable is set in command line, it is retained.
Consider the below case
$ cat ti
export MDS_CODE_HOME=`pwd`
echo $MDS_CODE_HOME
rsamadde@pcasvs04 ~/R2ANew
$ ti... (3 Replies)
Discussion started by: gogol
3 Replies
7. 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
8. 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
9. Shell Programming and Scripting
Can one string type variable changed into the date type variable. (1 Reply)
Discussion started by: rinku
1 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