Shell script input directory

Tags: shell

I am trying to make enqueue a directory in audacious. For that I want to make a shell script which will take the input I am giving as the directory to enqueue. find . -iname \*.mp3 -print0 | xargs --null audacious --enqueue this will enqueue all the files in the current directory. I want to make a shell script which takes the input for current directory.

By : supremum


Assuming that when you say "input" you're referring to command-line arguments:

exec find "[email protected]" -iname '*.mp3' -exec audacious --enqueue '{}' +

You could use Convert.ChangeType for that:

public void Add(object value)
    var t = Convert.ChangeType(value, typeof(T));

See the fiddle:

If you need object insead of T you can use dynamic in your Add method.

 public void Add(object value)
      //When T is decimal, then I get 
      // System.InvalidCastException
      dynamic t1 = value;
      var t = (T)t1;
By : steryd

This video can help you solving your question :)
By: admin