-2

I have a Data => File1.txt

Data

@demo/file/wk/Fil0.fk
@demo/file/wk/Fil1.fk
@demo/file/wk/Fil2.fk
@demo/file/wk/Fil3.fk
@demo/file/wk/Fil4.fk

Want to Print the data to Another File2.txt in below Format

Fil0.fk
Fil1.fk
Fil2.fk
Fil3.fk
Fil4.fk
jww
  • 97,681
  • 90
  • 411
  • 885
  • 1
    cat File1.txt | cut -d'/' -f 4 > File2.txt – IMParasharG May 31 '19 at 12:11
  • @GovindParashar ... Thanks !!! ..... I will post another Question which is similar to this but this Some what complex ... Could you be able to fix that complex one – volmokirti May 31 '19 at 12:22
  • As Ulrich asked in your [other question](https://stackoverflow.com/questions/56393207/remove-match-word-from-file#comment99385356_56393207), please pick a programming language or general text processing tool. As a new user, please take the [tour](https://stackoverflow.com/tour) and read [How to Ask](https://stackoverflow.com/questions/how-to-ask) as well. – jww May 31 '19 at 12:27

1 Answers1

1

Try below code :

cat File1.txt | cut -d'/' -f 4 > File2.txt
IMParasharG
  • 1,869
  • 1
  • 15
  • 26
  • Thanks !!! ..... I will post another Question which is similar to this but this Some what complex ... Could you be able to fix that complex one – volmokirti May 31 '19 at 12:45