Search Results

Search: Posts Made By: f150
6,521
Posted By DGPickett
Yes, ther sed regex says anything but a dot...
Yes, ther sed regex says anything but a dot '[^.]' in any quantity '*'. We could have been tighter and said just numbers '[0-9]'. The shell variable grinders are gentle up to the '-': '#*-' and...
6,521
Posted By RavinderSingh13
Hi f150, Welcome to forum, please use code tags...
Hi f150,
Welcome to forum, please use code tags while posting codes and commands in your post as per forum rules. Following may help you in same.


awk...
6,521
Posted By DGPickett
In ksh/bash:while read f do f=${f#*-} ...
In ksh/bash:while read f
do
f=${f#*-}
f=${f%%.*}
echo $f
done <file_name_list

or exploiting the '-' an '.' more:

( IFS="$IFS-."
while read f1 f2 f3
do
echo $f2
done...
Showing results 1 to 3 of 3

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