Opening all .smi files from subdirectories into one file
up vote
0
down vote
favorite
I have a folder with number of subdirectories; each subdirectory has multiple files with .smi
extension. I am trying to open content of all of them into one file.
I have tried this:
find ./*/*.smi | xargs xdg-open > one_file
find . | xargs xdg-open > one_file
xdg-open */*.smi > one_file
open **/*.smi > one_file
It seems that I am doing something wrong, can somebody help me?
bash
add a comment |Â
up vote
0
down vote
favorite
I have a folder with number of subdirectories; each subdirectory has multiple files with .smi
extension. I am trying to open content of all of them into one file.
I have tried this:
find ./*/*.smi | xargs xdg-open > one_file
find . | xargs xdg-open > one_file
xdg-open */*.smi > one_file
open **/*.smi > one_file
It seems that I am doing something wrong, can somebody help me?
bash
content of your .smi files are subtitles, so just text ?
â RoVo
Jun 5 at 7:19
yes yes, just text :)
â sergio
Jun 5 at 7:21
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a folder with number of subdirectories; each subdirectory has multiple files with .smi
extension. I am trying to open content of all of them into one file.
I have tried this:
find ./*/*.smi | xargs xdg-open > one_file
find . | xargs xdg-open > one_file
xdg-open */*.smi > one_file
open **/*.smi > one_file
It seems that I am doing something wrong, can somebody help me?
bash
I have a folder with number of subdirectories; each subdirectory has multiple files with .smi
extension. I am trying to open content of all of them into one file.
I have tried this:
find ./*/*.smi | xargs xdg-open > one_file
find . | xargs xdg-open > one_file
xdg-open */*.smi > one_file
open **/*.smi > one_file
It seems that I am doing something wrong, can somebody help me?
bash
asked Jun 5 at 6:55
sergio
565
565
content of your .smi files are subtitles, so just text ?
â RoVo
Jun 5 at 7:19
yes yes, just text :)
â sergio
Jun 5 at 7:21
add a comment |Â
content of your .smi files are subtitles, so just text ?
â RoVo
Jun 5 at 7:19
yes yes, just text :)
â sergio
Jun 5 at 7:21
content of your .smi files are subtitles, so just text ?
â RoVo
Jun 5 at 7:19
content of your .smi files are subtitles, so just text ?
â RoVo
Jun 5 at 7:19
yes yes, just text :)
â sergio
Jun 5 at 7:21
yes yes, just text :)
â sergio
Jun 5 at 7:21
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Your commands, e.g. [...] xdg-open > one_file
will open the files one by one and send the output of xdg-open
to one_file
.
But I think you first want to merge the files, and then open the merged file.
You can use cat
to concatenate text files:
find . -name "*.smi" -exec cat + > one_file.smi
xdg-open one_file.smi
1
If my answer worked for you, please consider accepting it.
â RoVo
Jun 5 at 10:33
Oh, I thought I did yesterday. Thank you for reminding me and thank you once again!
â sergio
Jun 7 at 7:22
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Your commands, e.g. [...] xdg-open > one_file
will open the files one by one and send the output of xdg-open
to one_file
.
But I think you first want to merge the files, and then open the merged file.
You can use cat
to concatenate text files:
find . -name "*.smi" -exec cat + > one_file.smi
xdg-open one_file.smi
1
If my answer worked for you, please consider accepting it.
â RoVo
Jun 5 at 10:33
Oh, I thought I did yesterday. Thank you for reminding me and thank you once again!
â sergio
Jun 7 at 7:22
add a comment |Â
up vote
1
down vote
accepted
Your commands, e.g. [...] xdg-open > one_file
will open the files one by one and send the output of xdg-open
to one_file
.
But I think you first want to merge the files, and then open the merged file.
You can use cat
to concatenate text files:
find . -name "*.smi" -exec cat + > one_file.smi
xdg-open one_file.smi
1
If my answer worked for you, please consider accepting it.
â RoVo
Jun 5 at 10:33
Oh, I thought I did yesterday. Thank you for reminding me and thank you once again!
â sergio
Jun 7 at 7:22
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Your commands, e.g. [...] xdg-open > one_file
will open the files one by one and send the output of xdg-open
to one_file
.
But I think you first want to merge the files, and then open the merged file.
You can use cat
to concatenate text files:
find . -name "*.smi" -exec cat + > one_file.smi
xdg-open one_file.smi
Your commands, e.g. [...] xdg-open > one_file
will open the files one by one and send the output of xdg-open
to one_file
.
But I think you first want to merge the files, and then open the merged file.
You can use cat
to concatenate text files:
find . -name "*.smi" -exec cat + > one_file.smi
xdg-open one_file.smi
edited Jun 5 at 7:30
answered Jun 5 at 7:22
RoVo
4,536932
4,536932
1
If my answer worked for you, please consider accepting it.
â RoVo
Jun 5 at 10:33
Oh, I thought I did yesterday. Thank you for reminding me and thank you once again!
â sergio
Jun 7 at 7:22
add a comment |Â
1
If my answer worked for you, please consider accepting it.
â RoVo
Jun 5 at 10:33
Oh, I thought I did yesterday. Thank you for reminding me and thank you once again!
â sergio
Jun 7 at 7:22
1
1
If my answer worked for you, please consider accepting it.
â RoVo
Jun 5 at 10:33
If my answer worked for you, please consider accepting it.
â RoVo
Jun 5 at 10:33
Oh, I thought I did yesterday. Thank you for reminding me and thank you once again!
â sergio
Jun 7 at 7:22
Oh, I thought I did yesterday. Thank you for reminding me and thank you once again!
â sergio
Jun 7 at 7:22
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1043721%2fopening-all-smi-files-from-subdirectories-into-one-file%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
content of your .smi files are subtitles, so just text ?
â RoVo
Jun 5 at 7:19
yes yes, just text :)
â sergio
Jun 5 at 7:21