mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-26 06:17:01 +00:00
add sed
This commit is contained in:
parent
35656ea015
commit
a8a00d052d
@ -245,6 +245,11 @@ e.g. add the filename to every last column of the file
|
|||||||
```bash
|
```bash
|
||||||
for i in $(ls);do sed -i "s/$/\t$i/" $i;done
|
for i in $(ls);do sed -i "s/$/\t$i/" $i;done
|
||||||
```
|
```
|
||||||
|
#####add extension of filename to last column
|
||||||
|
|
||||||
|
```bash
|
||||||
|
for i in T000086_1.02.n T000086_1.02.p;do sed "s/$/\t${i/*./}/" $i;done >T000086_1.02.np
|
||||||
|
```
|
||||||
|
|
||||||
#####remove newline\ nextline
|
#####remove newline\ nextline
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user