Vi *


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Vi *
# 1  
Old 07-14-2003
Question Vi *

hi all,

i want read several programs with vi *pgm.
Can i start to read file from for exsample pgm 10?

ex.
1
2
3
4
5
6
7
8
9
10 i want start the vi *pgm HERE !!!
11
12
13
14
15
.
.
.


THANKS IN ADVANCE!!!
# 2  
Old 07-14-2003
You could use a loop...

Code:
for FILE in `ls *pgm`
do
 vi $FILE
done

# 3  
Old 07-14-2003
MySQL from pgm10

hi,

ok, but to start from pgm 10?
# 4  
Old 07-14-2003
Now I think I know what you're asking.. you should read up on the man page for vi though...
Code:
for FILE in `ls *pgm`
do
 vi +10j $FILE
done

If you want to have the file be read-only, use the -R option.
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question