Flintlock has asked for the wisdom of the Perl Monks concerning the following question:
grep Acct: Facs_Data.txt |cut -d":" -f2 |cut -d" " -f1
it returns the right half of the search i.e. Acct:1234 returns 1234. and I would then use this 1234 to create a file named 1234_2017.txtSo my question is: How can I achieve the same thing in Perl from opening a file that has more than one entry of Acct: ?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do I use grep in a script
by Corion (Patriarch) on Dec 26, 2017 at 17:18 UTC | |
by ikegami (Patriarch) on Dec 26, 2017 at 17:35 UTC | |
by Flintlock (Novice) on Dec 26, 2017 at 20:20 UTC | |
by Corion (Patriarch) on Dec 26, 2017 at 20:27 UTC | |
by Flintlock (Novice) on Dec 26, 2017 at 21:07 UTC | |
| |
Re: How do I use grep in a script
by ForgotPasswordAgain (Vicar) on Dec 26, 2017 at 17:19 UTC | |
by Laurent_R (Canon) on Dec 26, 2017 at 20:16 UTC | |
by ForgotPasswordAgain (Vicar) on Dec 27, 2017 at 17:17 UTC | |
by Laurent_R (Canon) on Dec 27, 2017 at 21:17 UTC | |
by ForgotPasswordAgain (Vicar) on Dec 28, 2017 at 00:30 UTC | |
|