Different behavior of mktemp Ubuntu 12.02 / Mint 9 Isadora
In a Bash script I use ImageMagick's convert command for doing some image processing.
I generate a temporal gif file for convert to write to.
I really need the file to have the .gif extension so convert knows that the destination file should be a gif file.
In Ubuntu 12.04 the following works fine:
mktemp /tmp/pre_XXXXXXXXXX.gif
But in Mint 9 Isadora I get the following error:
mktemp: too few X's in template
No matter how many X's I throw at it, it yields the same error, which is only fixed when I delete the ".gif" suffix.
Why is that ? Isn't Mint based on Ubuntu ?
ubuntu linux-mint tmp
add a comment |
In a Bash script I use ImageMagick's convert command for doing some image processing.
I generate a temporal gif file for convert to write to.
I really need the file to have the .gif extension so convert knows that the destination file should be a gif file.
In Ubuntu 12.04 the following works fine:
mktemp /tmp/pre_XXXXXXXXXX.gif
But in Mint 9 Isadora I get the following error:
mktemp: too few X's in template
No matter how many X's I throw at it, it yields the same error, which is only fixed when I delete the ".gif" suffix.
Why is that ? Isn't Mint based on Ubuntu ?
ubuntu linux-mint tmp
1
That should work, check ifmktemp
is defined as an alias or function:type mktemp
. Also trymktemp --tmpdir pre_XXXXXXXXXX.gif
– terdon♦
Aug 21 '13 at 15:20
1
To answer your question, yes Mint is based on Ubuntu. But your Mint version is quite old and is based on Ubuntu 10. Your command works on my Mint 15. Maybe the mktemp command changed between the Ubuntu 10 and 12, so between Mint 9 and the latest release of Mint.
– Junior Dussouillez
Aug 21 '13 at 16:14
Crossposting? askubuntu.com/questions/335414/…
– user15760
Aug 21 '13 at 16:47
add a comment |
In a Bash script I use ImageMagick's convert command for doing some image processing.
I generate a temporal gif file for convert to write to.
I really need the file to have the .gif extension so convert knows that the destination file should be a gif file.
In Ubuntu 12.04 the following works fine:
mktemp /tmp/pre_XXXXXXXXXX.gif
But in Mint 9 Isadora I get the following error:
mktemp: too few X's in template
No matter how many X's I throw at it, it yields the same error, which is only fixed when I delete the ".gif" suffix.
Why is that ? Isn't Mint based on Ubuntu ?
ubuntu linux-mint tmp
In a Bash script I use ImageMagick's convert command for doing some image processing.
I generate a temporal gif file for convert to write to.
I really need the file to have the .gif extension so convert knows that the destination file should be a gif file.
In Ubuntu 12.04 the following works fine:
mktemp /tmp/pre_XXXXXXXXXX.gif
But in Mint 9 Isadora I get the following error:
mktemp: too few X's in template
No matter how many X's I throw at it, it yields the same error, which is only fixed when I delete the ".gif" suffix.
Why is that ? Isn't Mint based on Ubuntu ?
ubuntu linux-mint tmp
ubuntu linux-mint tmp
edited Apr 4 '17 at 14:41
Tulains Córdova
asked Aug 21 '13 at 14:58
Tulains CórdovaTulains Córdova
5162723
5162723
1
That should work, check ifmktemp
is defined as an alias or function:type mktemp
. Also trymktemp --tmpdir pre_XXXXXXXXXX.gif
– terdon♦
Aug 21 '13 at 15:20
1
To answer your question, yes Mint is based on Ubuntu. But your Mint version is quite old and is based on Ubuntu 10. Your command works on my Mint 15. Maybe the mktemp command changed between the Ubuntu 10 and 12, so between Mint 9 and the latest release of Mint.
– Junior Dussouillez
Aug 21 '13 at 16:14
Crossposting? askubuntu.com/questions/335414/…
– user15760
Aug 21 '13 at 16:47
add a comment |
1
That should work, check ifmktemp
is defined as an alias or function:type mktemp
. Also trymktemp --tmpdir pre_XXXXXXXXXX.gif
– terdon♦
Aug 21 '13 at 15:20
1
To answer your question, yes Mint is based on Ubuntu. But your Mint version is quite old and is based on Ubuntu 10. Your command works on my Mint 15. Maybe the mktemp command changed between the Ubuntu 10 and 12, so between Mint 9 and the latest release of Mint.
– Junior Dussouillez
Aug 21 '13 at 16:14
Crossposting? askubuntu.com/questions/335414/…
– user15760
Aug 21 '13 at 16:47
1
1
That should work, check if
mktemp
is defined as an alias or function: type mktemp
. Also try mktemp --tmpdir pre_XXXXXXXXXX.gif
– terdon♦
Aug 21 '13 at 15:20
That should work, check if
mktemp
is defined as an alias or function: type mktemp
. Also try mktemp --tmpdir pre_XXXXXXXXXX.gif
– terdon♦
Aug 21 '13 at 15:20
1
1
To answer your question, yes Mint is based on Ubuntu. But your Mint version is quite old and is based on Ubuntu 10. Your command works on my Mint 15. Maybe the mktemp command changed between the Ubuntu 10 and 12, so between Mint 9 and the latest release of Mint.
– Junior Dussouillez
Aug 21 '13 at 16:14
To answer your question, yes Mint is based on Ubuntu. But your Mint version is quite old and is based on Ubuntu 10. Your command works on my Mint 15. Maybe the mktemp command changed between the Ubuntu 10 and 12, so between Mint 9 and the latest release of Mint.
– Junior Dussouillez
Aug 21 '13 at 16:14
Crossposting? askubuntu.com/questions/335414/…
– user15760
Aug 21 '13 at 16:47
Crossposting? askubuntu.com/questions/335414/…
– user15760
Aug 21 '13 at 16:47
add a comment |
2 Answers
2
active
oldest
votes
mktemp
is not a standard command and it differs wildly in functionality and options between systems (if the system even has an mktemp command). The only way to know what your mktemp
accepts is to read its manual on the system in question.
Anyway, you don't need the .gif
extension to tell imagemagick the result should be a gif file.
$ tmpfile=$(mktemp /tmp/pre_XXXXXX)
$ convert rose: "gif:$tmpfile"
$ file "$tmpfile"
/tmp/pre_MDDsuZ: GIF image data, version 89a, 70 x 46
add a comment |
The only difference i see is, it will create temp folder in /usr/tmp/...
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f87638%2fdifferent-behavior-of-mktemp-ubuntu-12-02-mint-9-isadora%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
mktemp
is not a standard command and it differs wildly in functionality and options between systems (if the system even has an mktemp command). The only way to know what your mktemp
accepts is to read its manual on the system in question.
Anyway, you don't need the .gif
extension to tell imagemagick the result should be a gif file.
$ tmpfile=$(mktemp /tmp/pre_XXXXXX)
$ convert rose: "gif:$tmpfile"
$ file "$tmpfile"
/tmp/pre_MDDsuZ: GIF image data, version 89a, 70 x 46
add a comment |
mktemp
is not a standard command and it differs wildly in functionality and options between systems (if the system even has an mktemp command). The only way to know what your mktemp
accepts is to read its manual on the system in question.
Anyway, you don't need the .gif
extension to tell imagemagick the result should be a gif file.
$ tmpfile=$(mktemp /tmp/pre_XXXXXX)
$ convert rose: "gif:$tmpfile"
$ file "$tmpfile"
/tmp/pre_MDDsuZ: GIF image data, version 89a, 70 x 46
add a comment |
mktemp
is not a standard command and it differs wildly in functionality and options between systems (if the system even has an mktemp command). The only way to know what your mktemp
accepts is to read its manual on the system in question.
Anyway, you don't need the .gif
extension to tell imagemagick the result should be a gif file.
$ tmpfile=$(mktemp /tmp/pre_XXXXXX)
$ convert rose: "gif:$tmpfile"
$ file "$tmpfile"
/tmp/pre_MDDsuZ: GIF image data, version 89a, 70 x 46
mktemp
is not a standard command and it differs wildly in functionality and options between systems (if the system even has an mktemp command). The only way to know what your mktemp
accepts is to read its manual on the system in question.
Anyway, you don't need the .gif
extension to tell imagemagick the result should be a gif file.
$ tmpfile=$(mktemp /tmp/pre_XXXXXX)
$ convert rose: "gif:$tmpfile"
$ file "$tmpfile"
/tmp/pre_MDDsuZ: GIF image data, version 89a, 70 x 46
answered Aug 21 '13 at 18:34
geirhageirha
35116
35116
add a comment |
add a comment |
The only difference i see is, it will create temp folder in /usr/tmp/...
New contributor
add a comment |
The only difference i see is, it will create temp folder in /usr/tmp/...
New contributor
add a comment |
The only difference i see is, it will create temp folder in /usr/tmp/...
New contributor
The only difference i see is, it will create temp folder in /usr/tmp/...
New contributor
New contributor
answered 16 mins ago
Prasad VuritiPrasad Vuriti
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f87638%2fdifferent-behavior-of-mktemp-ubuntu-12-02-mint-9-isadora%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
That should work, check if
mktemp
is defined as an alias or function:type mktemp
. Also trymktemp --tmpdir pre_XXXXXXXXXX.gif
– terdon♦
Aug 21 '13 at 15:20
1
To answer your question, yes Mint is based on Ubuntu. But your Mint version is quite old and is based on Ubuntu 10. Your command works on my Mint 15. Maybe the mktemp command changed between the Ubuntu 10 and 12, so between Mint 9 and the latest release of Mint.
– Junior Dussouillez
Aug 21 '13 at 16:14
Crossposting? askubuntu.com/questions/335414/…
– user15760
Aug 21 '13 at 16:47