separating filename and extension

Shell Programming and Scripting




Kindly Note - This is a Single User Post by Forum Member lucaspewkas Regarding:
separating filename and extension.
Please Follow The Primary Link Above to View the Full Discussion.

   
Old 04-06-2007
lucaspewkas lucaspewkas is offline
Registered User
 
separating filename and extension

Hi (warning: newbie question),
I am writing a script to run a series of tests on a program, which involves a line:

Code:
for file in `ls test_suite/*.args`

but later I want to send the output to file.out. But I need to separate the filename and extension somehow...Also $file contains "test_suite/" before each entry as well, how do I get rid of that (I assume it's in a similar way as the separation above)

Thanks!