10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
This is part of a larger script where I need to pass only 1 line of a file to the script, based on a variable and not a direct reference.
As part of a for loop :
# for((line=0;line<50;line++)); do
# awk ‘NR==$line' PhraseList.txt; done
... (5 Replies)
Discussion started by: Seth
5 Replies
2. Shell Programming and Scripting
Hello folks.
I am trying to increment my variable names to match a counter that is to be used later on...
Basically, i have a for loop that lists directories (for example TEST_OS DVP_OS PROD_OS ) but this loop is not static, it may contain 3 directory once and the next run 5 directories.
I... (6 Replies)
Discussion started by: Stephan
6 Replies
3. AIX
Hi,
I am able to login using su - or su directly ,
# prompt is coming, it doesnt ask for password.
any normal user on aix system is login using su - or su .
Please suggest where to change the configuration
direct root login is disabled in /etc/ssh/sshd_config file. (0 Replies)
Discussion started by: manoj.solaris
0 Replies
4. Shell Programming and Scripting
Hi Guys ,
I am having one command file like this
FILE1
################################
awk '/output/ {a=$2} {for(i=1;i<=NF;i++) { gsub("i1", i) ; gsub("i2",++i) ; gsub("P1", p) }}1' output >> out9
awk '/output/ {a=$2} {for(i=1;i<=NF;i++) { gsub("i1", i) ;... (2 Replies)
Discussion started by: jaita
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
want to increment a variable in a for loop like this:
for (( c=$total-1; c>=0; c-- ))
do
if ;
then
maximo=$valores
fi
done
But it gives the error:
No such file or directory
How can i do this only incrementing the c variable?
Thanks (8 Replies)
Discussion started by: limadario
8 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am using BASH. I have encountered a situation where the following is necessary (but I am not sure how to do it):
#Define multiple arrays, whose names only differ by a number:
ARRAY_1=(1 2 3)
ARRAY_2=(4 5 6)
ARRAY_3=(7 8 9)
#Define ARRAY_AMOUNT, the number of arrays. In this case... (1 Reply)
Discussion started by: msb65
1 Replies
7. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
Variable is resetting to 0 after incrementing in while loop
My bit of scripting displays the current users logged in the machine.
Then it reads in a specific username and displays the processes for that user.
The portion that I... (3 Replies)
Discussion started by: ratzlaff
3 Replies
8. Shell Programming and Scripting
Hi All,
Iam trying to increment a variable
Following is the code
#!/usr/bin/ksh
i=1;
i='expr $i+1';
echo $i;
Output:
expr $i+1
not able to understand why its happening in that way
i was expecting result as 2... if the above method is worng .. can you help how i can get... (3 Replies)
Discussion started by: kiranlalka
3 Replies
9. Programming
Here is my code:
int startingPort = 200;
string tempPort;
stringstream out;
out<<startingPort;
tempPort = out.str(); //tempPort carries startingPort in string format
//convert tempPort to *char - currentPort going to be passed into getaddrinfo()
char currentPort;... (10 Replies)
Discussion started by: f.ben.isaac
10 Replies
10. Linux
Hi all,
I have a variable with date as 20080831 . Now I want to increment it as 20080901 and so on.Is there any command for this. Please help me.
thanks
rameez (1 Reply)
Discussion started by: rameezrajas
1 Replies