Giter Club home page Giter Club logo

Comments (2)

pierrehirel avatar pierrehirel commented on July 25, 2024

Dear Sir,

Thank you for reporting this, it is an interesting point. The issue does not come from Atomsk, but from the expansion of the shell (bash or other). To convince you, do the following experiment:

  • create a directory named 1;
  • use "echo" before the Atomsk command to see what command is actually executed:

echo atomsk --create fcc 1.386720 Al orient [1-21] [10-1] [111] -duplicate 7 14 7 -ow e_0.0370_h_-44_lat.xsf

It will print the command that is actually run after shell expansion:

atomsk --create fcc 1.386720 Al orient 1 1 1 -duplicate 7 14 7 -ow e_0.0370_h_-44_lat.xsf

Here is what happens: because a folder named "1" exists, the shell (bash) expands the braces into file names (or folder names): [1-21] becomes 1, and the same happens with [1-10] and [111]. More generally, if a number inside the brackets match the name of an existing file or folder, then the whole bracket is replaced by that file or folder's name. This behaviour is described in the bash manual:

https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html#Filename-Expansion

So, at the moment when Atomsk is actually executed, it receives the arguments "1 1 1" -and tells you that something is wrong.

A simple solution is to delete the folder named "1" before running Atomsk. Another solution is to remove the brackets and run the command like this:

atomsk --create fcc 1.386720 Al orient 1-21 10-1 111 -duplicate 7 14 7 -ow e_0.0370_h_-44_lat.xsf

No brackets, therefore no shell expansion, and Atomsk will receive the correct arguments.

I hope this helps you

Best regards

from atomsk.

sphCow avatar sphCow commented on July 25, 2024

Thank you for your detailed explanation. I completely agree that shell expansion is causing this issue and nothing to do with atomsk itself. And also thanks for suggesting simple workarounds.

from atomsk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.