need some clarification on for loop in shel script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need some clarification on for loop in shel script
# 1  
Old 10-23-2008
need some clarification on for loop in shel script

for ( ( $i=0 ; $i<=6 ; $i++ ) )
do
p=/RSA-Data/PE-data00"${i}"

echo "$p"
done

---


i need output as below

/RSA-Data/PE-data000
.
.
.
/RSA-Data/PE-Data006
# 2  
Old 10-23-2008
Code:
for ((i=0 ; i<=6 ; i++ )) do p=/RSA-Data/PE-data00"${i}" echo "$p" done

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to simulate ''Esc'' keystroke in a bash shel script?

I am using Ubuntu 12.4 I am running the following script: ++++++++ #!/bin/bash while ; do xdotool mousemove 248 539 click 1 & sleep 3 done +++++++++ This moves the mouse on the specified position on the screen and clicks that pauses the script for 3 seconds and repeats the... (2 Replies)
Discussion started by: alfarnume
2 Replies

2. Homework & Coursework Questions

need help with a shel script plzz

hey how u doing guys ... I'm a student @ EMU and taking a beginner Linux class and I have those two extra credit project that im struggling with so I hope to get some correction and help write a shell script that will 1-prompt the user for a file name 2-check to see if the file exists... (2 Replies)
Discussion started by: flyman
2 Replies

3. Shell Programming and Scripting

Clarification on if loop in Shell scripting

Hi, I'm using Ksh and I'm seeing some of code in my programme as given below. Could you please let me know whats is this meeaing ? (I'm new to this unix) grep "1034" /u/kkk/bin/temp5.lst|cut -c1-2 >/u/kkk/bin/temp6.lst if then echo "" ... (2 Replies)
Discussion started by: shyamu544
2 Replies

4. Shell Programming and Scripting

shell script clarification

HI, I wrote the below script to find the files by geeting the input from the user like below echo 'FINDING THE FILES IN THE CURRENT PATH' read a c=$a echo 'THE FILE NAME IS' $c 'PLEASE COMFIRM with Y OR N' read b d=$b echo $d if then echo `find . -name` $c elif then echo 'TRY... (6 Replies)
Discussion started by: thelakbe
6 Replies

5. Shell Programming and Scripting

How to loop use while loop in csh script?

Hi all, i got 2 text file. file.txt value.txt i want use C shell script to write out while both of the file got different limit....how i going to write it in 1 while loop? (4 Replies)
Discussion started by: proghack
4 Replies

6. Shell Programming and Scripting

need loop clarification for the below code

for loop for string to check each path file count. can someone please help me out regarding this.. purpose is that it will gives the number of files inside the that directory.. i am bit confused in doing the loop for the above can someone plz fix. PATH1=/home/data1 PATH2=/home/data2... (2 Replies)
Discussion started by: mail2sant
2 Replies

7. Shell Programming and Scripting

script invoking shel script.

Hi, I have a shell script which will start a process in my prodution server. I want to write one more script as a cron job, which will start the first script at regular intervals. My question is what are the things I have to make sure to invoke the first script in second script. Can I... (3 Replies)
Discussion started by: pradeep_script
3 Replies

8. Shell Programming and Scripting

Shel program file handling

Hi, Iam having the file as follows: QWASEDRF1234567890098765 abc@quebex.com 000000000-932333 678394-56=3 9033894 QWASEDRF1234567890098765 abc@quebex.com 000000000-932333 678394-56=3 9033894 OPIUYTREE0986666544443322 dcsx@olivaa.net ... (14 Replies)
Discussion started by: nivas
14 Replies

9. Shell Programming and Scripting

remotely installing apache server using Shel scripting

Hi guys, I am trying to install apache server onto a remote machine. I file transferred the .gz file and extracted it on the remote server using shell scripts. Then I used the make and make install commands. Everything worked fine until now. I know that i had to change the httpd.conf... (2 Replies)
Discussion started by: tadi18
2 Replies

10. Shell Programming and Scripting

Shel Script doesn't work from Exceed

Hi, I am using this script to load up my Oracle Databases, but when I log in through Exceed, it hangs. Can anyone tell me what else I need to add to make this work?? Details ****************************************************************************************************... (11 Replies)
Discussion started by: dnkansah
11 Replies
Login or Register to Ask a Question