5 edited body
source | link

Using mv, sed and rev in one line:

mv "head.body.date.txt" "$(echo head.body.date.txt | rev | sed 's/\./_/2g' | rev)"

If you want to apply it on all txt files in current rep, using globs seems tricky because of how mv works, but you can do a for loop in a one-liner:

for file in *.txt; do mv "$file" "$(echo $file | rev | sed 's/\./_/2g' | rev)"; done

Slightly longer, but you can match several patterns in your lsloop !

Using mv, sed and rev in one line:

mv "head.body.date.txt" "$(echo head.body.date.txt | rev | sed 's/\./_/2g' | rev)"

If you want to apply it on all txt files in current rep, using globs seems tricky because of how mv works, but you can do a for loop in a one-liner:

for file in *.txt; do mv "$file" "$(echo $file | rev | sed 's/\./_/2g' | rev)"; done

Slightly longer, but you can match several patterns in your ls !

Using mv, sed and rev in one line:

mv "head.body.date.txt" "$(echo head.body.date.txt | rev | sed 's/\./_/2g' | rev)"

If you want to apply it on all txt files in current rep, using globs seems tricky because of how mv works, but you can do a for loop in a one-liner:

for file in *.txt; do mv "$file" "$(echo $file | rev | sed 's/\./_/2g' | rev)"; done

Slightly longer, but you can match several patterns in your loop !

4 added 2 characters in body
source | link

Using mv, sed and rev in one line:

mv head"head.body.date.txttxt" $"$(echo head.body.date.txt | rev | sed 's/\./_/2g' | rev)"

If you want to apply it on all txt files in current rep, using globs seems tricky because of how mv works, but you can do a for loop in a one-liner:

for file in $(ls *.txt);txt; do mv $file"$file" $"$(echo "$file"$file | rev | sed 's/\./_/2g' | rev);"; done

Slightly longer, but you can match several patterns in your ls !

Using mv, sed and rev in one line:

mv head.body.date.txt $(echo head.body.date.txt | rev | sed 's/\./_/2g' | rev)

If you want to apply it on all txt files in current rep, using globs seems tricky because of how mv works, but you can do a for loop in a one-liner:

for file in $(ls *.txt); do mv $file $(echo "$file" | rev | sed 's/\./_/2g' | rev); done

Slightly longer, but you can match several patterns in your ls !

Using mv, sed and rev in one line:

mv "head.body.date.txt" "$(echo head.body.date.txt | rev | sed 's/\./_/2g' | rev)"

If you want to apply it on all txt files in current rep, using globs seems tricky because of how mv works, but you can do a for loop in a one-liner:

for file in *.txt; do mv "$file" "$(echo $file | rev | sed 's/\./_/2g' | rev)"; done

Slightly longer, but you can match several patterns in your ls !

3 added 1 character in body
source | link

Using mv, sed and rev in one line:

mv head.body.date.txt $(echo head.body.date.txt | rev | sed 's/\./_/2g' | rev)

If you want to apply it on all txt files in current rep, using globs seems tricky because of how mv works, but you can do a for loop in a one-liner:

for file in $(ls *.txt); do mv $file $(echo "$file" | rev | sed 's/\./_/2g' | rev); done

Slightly longer, but you can match several patterns in youyour ls !

Using mv, sed and rev in one line:

mv head.body.date.txt $(echo head.body.date.txt | rev | sed 's/\./_/2g' | rev)

If you want to apply it on all txt files in current rep, using globs seems tricky because of how mv works, but you can do a for loop in a one-liner:

for file in $(ls *.txt); do mv $file $(echo "$file" | rev | sed 's/\./_/2g' | rev); done

Slightly longer, but you can match several patterns in you ls !

Using mv, sed and rev in one line:

mv head.body.date.txt $(echo head.body.date.txt | rev | sed 's/\./_/2g' | rev)

If you want to apply it on all txt files in current rep, using globs seems tricky because of how mv works, but you can do a for loop in a one-liner:

for file in $(ls *.txt); do mv $file $(echo "$file" | rev | sed 's/\./_/2g' | rev); done

Slightly longer, but you can match several patterns in your ls !

2 added 319 characters in body
source | link
1
source | link