My script worked before changing it's directory (it was in the same directory as Main Dir:
#!/bin/bash
name=$1
amount=$2
cat "Main Dir/$name/sent.txt"|sort -k2|cut -d" " -d" "-f1|tail -n-$amount
Now I've created aside "Main Dir" another directory "scripts" and put my script there.
#!/bin/bash
name=$1
amount=$2
cat "../Main Dir/$name/sent.txt"|sort -k2|cut -d" " -d" " -f1|tail -n-$amount
Trying to run it now from the command stroke by "sh path/name.txt param1 param2" but it say's "No such file or directory"?
How should I change the path in cat command ?