Visit The New, Modern Unix Linux Community


Vi *


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Vi *
# 1  
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  
You could use a loop...

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

# 3  
MySQL from pgm10

hi,

ok, but to start from pgm 10?
# 4  
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.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #404
Difficulty: Easy
Cygwin provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment.
True or False?

Featured Tech Videos