Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 02-02-2013, 04:24 PM   #1
LQ Newbie
Registered: Oct 2011
Posts: 26

Rep: Reputation: Disabled
open list of files with xdg-open

I have a fancy sed command in a bash script that, depending on command parameters, returns a list of files separated by a newline. I would like to use xdg-open to open all the files, but xdg-open can apparently only take one file at a time. I am pretty new at bash scripting, so I was wondering if anyone has a way getting around this problem and opening all the files with xdg-open

Old 02-03-2013, 11:48 AM   #2
Senior Member
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346

fancy_sed_command | while read line; do
    xdg-open $line

fancy_sed_command | while read line; do
    xdg-open $line &
if you want them all opened at the same time, not one by one



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] xdg-open: no method available for opening Amdx2_x64 Programming 3 12-13-2017 11:00 PM
[SOLVED] xdg-open doesn't recognize custom protocol mickael.cruz Linux - Desktop 1 10-25-2012 05:09 AM
a weird xdg-open issue Oxpoto Linux - Software 0 07-23-2011 03:56 AM
xdg-open, gnome-open or kde(4?)-open??? akamikeym Programming 0 08-03-2010 08:54 AM
List all files and recursively open directories. unreal128 Linux - General 2 07-16-2005 02:06 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:45 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration