I've used the column command to split some of my output into 3 different columns. Problem is with the final column, the filetype output is being split into a 4th and 5th column because of the spaces. 

Can somebody tell me how to change my code so that output stays under the Filetype column?

```
list_files()
{   
  if [ "$(ls -A ~/.junkdir)" ]
  then
      filesdir=/home/student/.junkdir/*
      echo "Listing files in Junk Directory"      
      output="FILENAME SIZE(BYTES) TYPE \n\n---------------- ---------------- ------------------- "

  for listed_file in $filesdir
  do
      file_name=$(basename "file $listed_file" | cut -d ' ' -f1)
      file_size=$(du --bytes $listed_file | awk '{print $1}')
      file_type=$(file $listed_file | cut -d ' ' -f2-)
      output="$output\n${file_name} ${file_size} ${file_type}\n"
  done

  echo -ne $output | column -t 
  else
  echo 'Junk directory is empty'
  fi
}

```

The output at the moment..

```
Listing files in Junk Directory
FILENAME          SIZE(BYTES)       TYPE
----------------  ----------------  -------------------
files.txt         216               ASCII                text
forLoop           401               Bourne-Again         shell  script,  
ASCII  text  executable

```
['https://Stackoverflow.com/questions/47005284', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8791139/']
The proper way to do this would be to pass the clipping function `tf.clip_by_value` as the `constraint` argument to the `tf.Variable` constructor:

```
Mj=tf.get_variable('Mj_',
                   dtype=tf.float32,
                   shape=[500,4],
                   initializer=tf.random_uniform_initializer(maxval=1, minval=0),
                   constraint=lambda t: tf.clip_by_value(t, 0, 1))

```

From the docs of `tf.Variable`:

> 
> constraint: An optional projection function to be applied to the
>  variable after being updated by an Optimizer (e.g. used to implement
>  norm constraints or value constraints for layer weights). The function
>  must take as input the unprojected Tensor representing the value of
>  the variable and return the Tensor for the projected value (which must
>  have the same shape). Constraints are not safe to use when doing
>  asynchronous distributed training.
> 
> 
> 

Or you might want to consider simply adding a nonlinearity [`tf.sigmoid`](https://www.tensorflow.org/api_docs/python/tf/sigmoid) on top of your variable.

```
Mj=tf.get_variable('Mj_',dtype=tf.float32, shape=[500,4])
Mj_out=tf.sigmoid(Mj)

```

This will transform your variable to range between 0 and 1. Read more about activation functions [here](https://www.tensorflow.org/api_guides/python/nn#Activation_Functions).
I think the function you're looking for is `tf.clip_by_value`.

Link to [Docs](https://www.tensorflow.org/api_docs/python/tf/clip_by_value).