Question: What is the difference between the 2 lines below? They do the same thing so is there any difference ?

```
string filename = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName);
string filename = FileUpload1.PostedFile.FileName;

```

Answer: 
Perl to the rescue:

```
echo file:///home/sashoalm/Has%20Spaces.txt |\
  perl -MURI -MURI::Escape -lne \
      'print uri_unescape(URI->new($_)->path)'

```

See [URI](http://p3rl.org/URI) and [URI::Escape](http://p3rl.org/URI::Escape).
GNU awk

```perl
#!/usr/bin/awk -fn
@include "ord"
BEGIN {
  RS = "%.."
}
{
  printf RT ? $0 chr("0x" substr(RT, 2)) : $0
}

```

Or 

```
#!/bin/sh
awk -niord '{printf RT?$0chr("0x"substr(RT,2)):$0}' RS=%..

```

[How to decode URL-encoded string in shell?](https://stackoverflow.com/q/6250698/#14000368)