Opening multiple documents at once


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Opening multiple documents at once
# 1  
Old 05-11-2008
Opening multiple documents at once

I'm trying this:
Code:
$ for n in `ls` ;  do xterm -e vim $n  & ; done
bash: syntax error near unexpected token `;'
$

I want to edit my files all at once, not one at a time. How can I do that?
# 2  
Old 05-11-2008
Simply remove the semicolon from the statement, the & sign serves as a separator:

Code:
for n in * ;  do xterm -e vim "$n"  &   done

It could have been easier if you ran the code from the command line, one line at a time:

Code:
for n in * 
  do 
    xterm -e vim "$n"  &                       # optionally use xterm -hold -e vim ...  if needed.
 done

# 3  
Old 05-12-2008
Oh, it's so simple! Thanks, that works nicely.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Close CMD after opening multiple exe's with it ?

Current code: cd "PATH" cmd /c "EXE1.exe" "EXE2.exe" Problem: The Command line stays open after opening the second executable. I would need a way to open multiple programs and automatically close the command line after they have been opened. Thanks in advance: pasc (14 Replies)
Discussion started by: pasc
14 Replies

2. UNIX for Dummies Questions & Answers

2 (two) here documents in a row

Ok, it may sound a bit stupid but I can't find the answer.. How do one put 2 here documents in a row? for instance, i want to do something like: diff <<eof <<eof2 # doesn't work... > a > b > eof > a > c > eof2 its mostly to satisfy my curiosity!! thanks, Anthony (4 Replies)
Discussion started by: anthalamus
4 Replies

3. Shell Programming and Scripting

Run multiple commands in $() without opening a new shell

The code below works, but takes too many lines and looks awkward: db2 "export to $filename of del select * from $table with ur"|tee -a $LOGFILE|awk '/Number of rows exported:/ {print $5}' > numrows.tmp numrows=$(cat numrows.tmp) rm numrows.tmp When I try the... (2 Replies)
Discussion started by: akar_naveen
2 Replies

4. Windows & DOS: Issues & Discussions

bat file opening multiple IE windows

I'm trying to open multiple IE windows and enter the same text and press <enter> on each. Here's an example with what I have so far. REM Open @echo on start http://10.1.1.1 ping 1.1.1.1 -n 5 -w 1000 >nul @echo password start http://10.1.1.2 ping 1.1.1.1 -n 5 -w 1000 >nul @echo password... (2 Replies)
Discussion started by: Pitt
2 Replies

5. AIX

books & documents

can someone tell me the name of the books for aix it is better if some one provide me links to any useful document (2 Replies)
Discussion started by: alokjyotibal
2 Replies

6. Shell Programming and Scripting

How to search accross other documents?

Could do with some help on where to get started really. If anyone could help me it would be greatly appreciated. I have been working on this for a while now and I don't really know where to start. I am looking into creating a script that will process website hit files and output statistical... (1 Reply)
Discussion started by: amatuer_lee_3
1 Replies

7. OS X (Apple)

keyword searching of documents

Unix based fix-it needed? Platform and feature: search programs on Apple computers (Leopard or Tiger; 10.4 and above; Spotlight) Problem: the document search feature of these programs produce hits when keyword(s) used appear anywhere in the document's content. Change required: we need to... (1 Reply)
Discussion started by: Miles
1 Replies

8. Solaris

Batch converting documents

Here is the situation. We are a company that has been using a professional publishing system, the software is called "ProType". It runs on Solaris 2.4, however it is no longer supported and we are forced to move on to Adobe Indesign. We must convert all our documents (thousands) to InDesign format.... (4 Replies)
Discussion started by: Fred Goldman
4 Replies

9. Solaris

sudo documents

I have installed sudo on our development server (SPARC,Solaris 9) and trying to edit /etc/sudoers file using visudo. Referred the following sites and not able to find the way. http://www.courtesan.com/sudo/man/sudoers.html http://www.kempston.net/solaris/sudo.html To start with sudo, my... (3 Replies)
Discussion started by: chrs0302
3 Replies

10. UNIX for Dummies Questions & Answers

Printing documents using LaTeX

Hi I want to know how to give a file for printing using Latex formatting also where can I get the latex s/w . Thanks in advance (1 Reply)
Discussion started by: gosavi_ganesh
1 Replies
Login or Register to Ask a Question