With Perl:
#!/usr/bin/perl -w
$filename = shift;
$filename =~ s/\.\S*//;
print "$filename\n";
Bart
-----Original Message-----
From:
plug-discuss-admin@lists.plug.phoenix.az.us
[
mailto:plug-discuss-admin@lists.plug.phoenix.az.us]On Behalf Of Entelin
Sent: Monday, March 03, 2003 9:39 PM
To: Phoenix Linux Users Group
Subject: how do I chop of characters at the end of a line...
I want to take a variable say a="string.txt" and chop off the last 4
characters so I can make variable b equal to just "string"
Thanks for your help
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss