Search Results

Search: Posts Made By: ah7391
5,320
Posted By curleb
I'd agree with scottn on the expr command. Both...
I'd agree with scottn on the expr command. Both awk and cut would work too:


$ echo "neo_opls01_1.log" |awk -F'.' '{print $1;}'
neo_opls01_1
$ echo "neo_opls01_1.log" |cut -d'.' -f1...
5,320
Posted By Scott
$ echo ${X%%1.log} neo_opls01_ $ echo...
$ echo ${X%%1.log}
neo_opls01_

$ echo ${X/?.log/}
neo_opls01_


If it starts getting too fancy, I'd switch to sed!
5,320
Posted By Scott
Hi. I never use expr anyway - it's a...
Hi.

I never use expr anyway - it's a terrible command imo :D


$ X="neo_opls01_1.log"
$ echo ${X%.*}
neo_opls01_1
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 02:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy