Computing.Net > Forums > Linux > Can I use awk in a perl script?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Can I use awk in a perl script?

Reply to Message Icon

Name: skat2004
Date: November 24, 2004 at 03:33:31 Pacific
OS: Solaris
CPU/Ram: Sparc
Comment:

I'm just learning perl and I have a question.
Can I use awk in a perl script?
I tried this
@s_users=`/usr/bin/last | head |awk {'print $1'}"` ;
but it didn't work.
The result is just the commans last|head
Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: skat2004
Date: November 24, 2004 at 04:03:48 Pacific
Reply:

I found my mistake.
I had forgotten the \
@s_users=`/usr/bin/last | head |awk {'print \$1'}"` ;
No it's correct


0

Response Number 2
Name: Wolfbone
Date: November 24, 2004 at 04:32:27 Pacific
Reply:

Heh! - Using awk in a perl script in a python script in a lisp program might be possible too.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


DNS Slave Server on Linux... blocking websites



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Can I use awk in a perl script?

Using rsync in a script www.computing.net/answers/linux/using-rsync-in-a-script/27680.html

which function can i use in placeof itoa www.computing.net/answers/linux/which-function-can-i-use-in-placeof-itoa/11315.html

Using Mailto in shell scripts www.computing.net/answers/linux/using-mailto-in-shell-scripts/27632.html