curl to stdout and untar a zip to a specific directory [duplicate]
Clash Royale CLAN TAG#URR8PPP
up vote
-3
down vote
favorite
This question already has an answer here:
How to redirect output of wget as input to unzip?
5 answers
How to curl and unzip to a certain directory? [duplicate]
1 answer
What is the correct way to curl to stdout, then untar
(a zip file in that case) to a specific directory?
This failed:
curl URL | tar -x > /path
So I thought of this which also failed:
curl URL | tar -x > /path
directory tar curl stdout
marked as duplicate by Jeff Schaller, Stephen Kitt, ilkkachu, muru, G-Man Jan 31 at 0:33
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
 |Â
show 2 more comments
up vote
-3
down vote
favorite
This question already has an answer here:
How to redirect output of wget as input to unzip?
5 answers
How to curl and unzip to a certain directory? [duplicate]
1 answer
What is the correct way to curl to stdout, then untar
(a zip file in that case) to a specific directory?
This failed:
curl URL | tar -x > /path
So I thought of this which also failed:
curl URL | tar -x > /path
directory tar curl stdout
marked as duplicate by Jeff Schaller, Stephen Kitt, ilkkachu, muru, G-Man Jan 31 at 0:33
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Why would you untar a zip file rather than unzipping it? Or is it a gzip file containing a tar archive? gzip and zip are two different things.
â DopeGhoti
Jan 30 at 19:53
curl URL | unzip > /path
fails.
â user273275
Jan 30 at 19:57
unzip
cannot unzip from standard input, as stated in its manual page. You will have to write to a temporary file,unzip
it, and delete the file.
â DopeGhoti
Jan 30 at 19:58
That's why I contemplatedtar
... It's not possible at all withtar
? I really don't know.
â user273275
Jan 30 at 20:04
tar
doesn't speak PKZip.
â DopeGhoti
Jan 30 at 20:06
 |Â
show 2 more comments
up vote
-3
down vote
favorite
up vote
-3
down vote
favorite
This question already has an answer here:
How to redirect output of wget as input to unzip?
5 answers
How to curl and unzip to a certain directory? [duplicate]
1 answer
What is the correct way to curl to stdout, then untar
(a zip file in that case) to a specific directory?
This failed:
curl URL | tar -x > /path
So I thought of this which also failed:
curl URL | tar -x > /path
directory tar curl stdout
This question already has an answer here:
How to redirect output of wget as input to unzip?
5 answers
How to curl and unzip to a certain directory? [duplicate]
1 answer
What is the correct way to curl to stdout, then untar
(a zip file in that case) to a specific directory?
This failed:
curl URL | tar -x > /path
So I thought of this which also failed:
curl URL | tar -x > /path
This question already has an answer here:
How to redirect output of wget as input to unzip?
5 answers
How to curl and unzip to a certain directory? [duplicate]
1 answer
directory tar curl stdout
edited Jan 30 at 19:58
asked Jan 30 at 19:42
user273275
13
13
marked as duplicate by Jeff Schaller, Stephen Kitt, ilkkachu, muru, G-Man Jan 31 at 0:33
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Jeff Schaller, Stephen Kitt, ilkkachu, muru, G-Man Jan 31 at 0:33
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Why would you untar a zip file rather than unzipping it? Or is it a gzip file containing a tar archive? gzip and zip are two different things.
â DopeGhoti
Jan 30 at 19:53
curl URL | unzip > /path
fails.
â user273275
Jan 30 at 19:57
unzip
cannot unzip from standard input, as stated in its manual page. You will have to write to a temporary file,unzip
it, and delete the file.
â DopeGhoti
Jan 30 at 19:58
That's why I contemplatedtar
... It's not possible at all withtar
? I really don't know.
â user273275
Jan 30 at 20:04
tar
doesn't speak PKZip.
â DopeGhoti
Jan 30 at 20:06
 |Â
show 2 more comments
Why would you untar a zip file rather than unzipping it? Or is it a gzip file containing a tar archive? gzip and zip are two different things.
â DopeGhoti
Jan 30 at 19:53
curl URL | unzip > /path
fails.
â user273275
Jan 30 at 19:57
unzip
cannot unzip from standard input, as stated in its manual page. You will have to write to a temporary file,unzip
it, and delete the file.
â DopeGhoti
Jan 30 at 19:58
That's why I contemplatedtar
... It's not possible at all withtar
? I really don't know.
â user273275
Jan 30 at 20:04
tar
doesn't speak PKZip.
â DopeGhoti
Jan 30 at 20:06
Why would you untar a zip file rather than unzipping it? Or is it a gzip file containing a tar archive? gzip and zip are two different things.
â DopeGhoti
Jan 30 at 19:53
Why would you untar a zip file rather than unzipping it? Or is it a gzip file containing a tar archive? gzip and zip are two different things.
â DopeGhoti
Jan 30 at 19:53
curl URL | unzip > /path
fails.â user273275
Jan 30 at 19:57
curl URL | unzip > /path
fails.â user273275
Jan 30 at 19:57
unzip
cannot unzip from standard input, as stated in its manual page. You will have to write to a temporary file, unzip
it, and delete the file.â DopeGhoti
Jan 30 at 19:58
unzip
cannot unzip from standard input, as stated in its manual page. You will have to write to a temporary file, unzip
it, and delete the file.â DopeGhoti
Jan 30 at 19:58
That's why I contemplated
tar
... It's not possible at all with tar
? I really don't know.â user273275
Jan 30 at 20:04
That's why I contemplated
tar
... It's not possible at all with tar
? I really don't know.â user273275
Jan 30 at 20:04
tar
doesn't speak PKZip.â DopeGhoti
Jan 30 at 20:06
tar
doesn't speak PKZip.â DopeGhoti
Jan 30 at 20:06
 |Â
show 2 more comments
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
Duplicate of How to redirect output of wget as input to unzip? (wget
and curl
are interchangeable in this context). Please see this answer. Replicating it here:
wget URL -O path/temp.zip; unzip -d path path/temp.zip; rm path/temp.zip
Replace URL
and path
accordingly.
add a comment |Â
up vote
-2
down vote
Maybe this will work:
curl URL > /path && tar -xvf /path
2
The||
is a logical 'or' operator. It will cause thetar
command to only be executed if thecurl
command returns a failure exit code. I asw your answer only because I offered to help new contributors to this site by offering advice, so I guess the advice would be to try out your answer before posting it. You may have meant to use the logical 'and' operator&&
.
â user1404316
Jan 30 at 21:51
1
@StephenKitt I'm curious...
â roaima
Jan 30 at 22:21
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Duplicate of How to redirect output of wget as input to unzip? (wget
and curl
are interchangeable in this context). Please see this answer. Replicating it here:
wget URL -O path/temp.zip; unzip -d path path/temp.zip; rm path/temp.zip
Replace URL
and path
accordingly.
add a comment |Â
up vote
0
down vote
accepted
Duplicate of How to redirect output of wget as input to unzip? (wget
and curl
are interchangeable in this context). Please see this answer. Replicating it here:
wget URL -O path/temp.zip; unzip -d path path/temp.zip; rm path/temp.zip
Replace URL
and path
accordingly.
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Duplicate of How to redirect output of wget as input to unzip? (wget
and curl
are interchangeable in this context). Please see this answer. Replicating it here:
wget URL -O path/temp.zip; unzip -d path path/temp.zip; rm path/temp.zip
Replace URL
and path
accordingly.
Duplicate of How to redirect output of wget as input to unzip? (wget
and curl
are interchangeable in this context). Please see this answer. Replicating it here:
wget URL -O path/temp.zip; unzip -d path path/temp.zip; rm path/temp.zip
Replace URL
and path
accordingly.
answered Jan 30 at 20:45
thiagowfx
726412
726412
add a comment |Â
add a comment |Â
up vote
-2
down vote
Maybe this will work:
curl URL > /path && tar -xvf /path
2
The||
is a logical 'or' operator. It will cause thetar
command to only be executed if thecurl
command returns a failure exit code. I asw your answer only because I offered to help new contributors to this site by offering advice, so I guess the advice would be to try out your answer before posting it. You may have meant to use the logical 'and' operator&&
.
â user1404316
Jan 30 at 21:51
1
@StephenKitt I'm curious...
â roaima
Jan 30 at 22:21
add a comment |Â
up vote
-2
down vote
Maybe this will work:
curl URL > /path && tar -xvf /path
2
The||
is a logical 'or' operator. It will cause thetar
command to only be executed if thecurl
command returns a failure exit code. I asw your answer only because I offered to help new contributors to this site by offering advice, so I guess the advice would be to try out your answer before posting it. You may have meant to use the logical 'and' operator&&
.
â user1404316
Jan 30 at 21:51
1
@StephenKitt I'm curious...
â roaima
Jan 30 at 22:21
add a comment |Â
up vote
-2
down vote
up vote
-2
down vote
Maybe this will work:
curl URL > /path && tar -xvf /path
Maybe this will work:
curl URL > /path && tar -xvf /path
edited Jan 30 at 22:17
Stephen Kitt
142k22308370
142k22308370
answered Jan 30 at 20:18
Sanchd
1
1
2
The||
is a logical 'or' operator. It will cause thetar
command to only be executed if thecurl
command returns a failure exit code. I asw your answer only because I offered to help new contributors to this site by offering advice, so I guess the advice would be to try out your answer before posting it. You may have meant to use the logical 'and' operator&&
.
â user1404316
Jan 30 at 21:51
1
@StephenKitt I'm curious...
â roaima
Jan 30 at 22:21
add a comment |Â
2
The||
is a logical 'or' operator. It will cause thetar
command to only be executed if thecurl
command returns a failure exit code. I asw your answer only because I offered to help new contributors to this site by offering advice, so I guess the advice would be to try out your answer before posting it. You may have meant to use the logical 'and' operator&&
.
â user1404316
Jan 30 at 21:51
1
@StephenKitt I'm curious...
â roaima
Jan 30 at 22:21
2
2
The
||
is a logical 'or' operator. It will cause the tar
command to only be executed if the curl
command returns a failure exit code. I asw your answer only because I offered to help new contributors to this site by offering advice, so I guess the advice would be to try out your answer before posting it. You may have meant to use the logical 'and' operator &&
.â user1404316
Jan 30 at 21:51
The
||
is a logical 'or' operator. It will cause the tar
command to only be executed if the curl
command returns a failure exit code. I asw your answer only because I offered to help new contributors to this site by offering advice, so I guess the advice would be to try out your answer before posting it. You may have meant to use the logical 'and' operator &&
.â user1404316
Jan 30 at 21:51
1
1
@StephenKitt I'm curious...
â roaima
Jan 30 at 22:21
@StephenKitt I'm curious...
â roaima
Jan 30 at 22:21
add a comment |Â
Why would you untar a zip file rather than unzipping it? Or is it a gzip file containing a tar archive? gzip and zip are two different things.
â DopeGhoti
Jan 30 at 19:53
curl URL | unzip > /path
fails.â user273275
Jan 30 at 19:57
unzip
cannot unzip from standard input, as stated in its manual page. You will have to write to a temporary file,unzip
it, and delete the file.â DopeGhoti
Jan 30 at 19:58
That's why I contemplated
tar
... It's not possible at all withtar
? I really don't know.â user273275
Jan 30 at 20:04
tar
doesn't speak PKZip.â DopeGhoti
Jan 30 at 20:06