    char line[31];
    int in;
    char new[9];

    for (int i = 1; i < 10; i++) {
        new[i-1] = line[i];
    }
    printf("%s\n", new);
output is rwx-------rwx------, expected output is rwx-------