how to extract specific part of a file name [duplicate]
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
This question already has an answer here:
Remove prefixes from filenames
2 answers
how to extract part of a filename before '.' or before extension
6 answers
I have the following files in a directory:
spp.mydomain.net.current.csv
spp2.another.really.long.domain.current.csv
I'd like to be able to remove just the spp or the spp2 part of the name using bash.
I found another similar post here but the OP wanted to extract a specific part of the name like this:
awk -F'[.]' 'print $4'
But in my case, I want to keep everything except always remove the first part of the name.
bash shell-script
marked as duplicate by jasonwryan, don_crissti, Jeff Schaller, Archemar, Timothy Martin Mar 14 at 20:35
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |Â
up vote
0
down vote
favorite
This question already has an answer here:
Remove prefixes from filenames
2 answers
how to extract part of a filename before '.' or before extension
6 answers
I have the following files in a directory:
spp.mydomain.net.current.csv
spp2.another.really.long.domain.current.csv
I'd like to be able to remove just the spp or the spp2 part of the name using bash.
I found another similar post here but the OP wanted to extract a specific part of the name like this:
awk -F'[.]' 'print $4'
But in my case, I want to keep everything except always remove the first part of the name.
bash shell-script
marked as duplicate by jasonwryan, don_crissti, Jeff Schaller, Archemar, Timothy Martin Mar 14 at 20:35
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
2
echo "$line#*."
â jasonwryan
Mar 14 at 19:48
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This question already has an answer here:
Remove prefixes from filenames
2 answers
how to extract part of a filename before '.' or before extension
6 answers
I have the following files in a directory:
spp.mydomain.net.current.csv
spp2.another.really.long.domain.current.csv
I'd like to be able to remove just the spp or the spp2 part of the name using bash.
I found another similar post here but the OP wanted to extract a specific part of the name like this:
awk -F'[.]' 'print $4'
But in my case, I want to keep everything except always remove the first part of the name.
bash shell-script
This question already has an answer here:
Remove prefixes from filenames
2 answers
how to extract part of a filename before '.' or before extension
6 answers
I have the following files in a directory:
spp.mydomain.net.current.csv
spp2.another.really.long.domain.current.csv
I'd like to be able to remove just the spp or the spp2 part of the name using bash.
I found another similar post here but the OP wanted to extract a specific part of the name like this:
awk -F'[.]' 'print $4'
But in my case, I want to keep everything except always remove the first part of the name.
This question already has an answer here:
Remove prefixes from filenames
2 answers
how to extract part of a filename before '.' or before extension
6 answers
bash shell-script
asked Mar 14 at 19:46
dot
2531310
2531310
marked as duplicate by jasonwryan, don_crissti, Jeff Schaller, Archemar, Timothy Martin Mar 14 at 20:35
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by jasonwryan, don_crissti, Jeff Schaller, Archemar, Timothy Martin Mar 14 at 20:35
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
2
echo "$line#*."
â jasonwryan
Mar 14 at 19:48
add a comment |Â
2
echo "$line#*."
â jasonwryan
Mar 14 at 19:48
2
2
echo "$line#*."
â jasonwryan
Mar 14 at 19:48
echo "$line#*."
â jasonwryan
Mar 14 at 19:48
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
2
echo "$line#*."
â jasonwryan
Mar 14 at 19:48