Apparently there's just such an item in Bastion Press's Arms & Armor book, but a similar idea has cropped up from time to time. Play the video game Soul Calibur some time, and pick Ivy. She has just such a weapon. After I first played that game, I had to give an NPC in my D&D game a similar weapon, and here are the stats. In my game, it's a magical weapon, but here is the nonmagical version.
Whipblade:
The whipblade performs both as a standard longsword and as a ranged weapon like a sharpened whip, allowing you to attack out to 15 feet with an actual cutting blade. Additionally, like a whip, the whipblade grants you a +2 bonus on your opposed attack roll when attempting to disarm an opponent (and since it counts as a medium weapon, it is even better at disarming than a normal whip, which is small). Because the whip can wrap around an enemy's leg or other limb, you can make trip attacks with it. If you are tripped during your own trip attempt, you can drop the whipblade to avoid being tripped.
If you attack a medium sized or smaller creature and have the Ranged Grapple feat, you may attempt to perform a ranged grapple with the whipblade, which is handled as a normal grapple, with the following exceptions.
Firstly, a ranged grapple obviously does not incur an attack of opportunity from the target because you are not bodily trying to grapple it. Secondly, since you only have one 'limb' that is performing the grapple, you suffer a -20 penalty to the grapple check. You may only attempt to grapple a medium-size target or smaller. Any successful attempt to break the grapple results in 2d8 slashing damage as the blade slices on its way off. You can only grapple one target like this at a time, and cannot use the whipblade for any other attacks while grappling, but once the grapple is successful you can release the blade and it will still maintain its hold.
If you have grappled an opponent with the whipblade, you gain a +4 bonus to all trip attempts against that target. Other possible actions include drawing the target in (resolved as a bull-rush, only in the opposite direction).
Whipblade, medium-size exotic weapon.
Slashing
1d8 damage
19-20/x2 crit
5 lbs.
500 gp (plus most whipblades are masterwork)