Help with awk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I bet awk has it's own user list but before I go and subscribe to another
one, I figured I would ask here first.  I have the following awk code that
is trying to set a variable of the shell it is running in.  It doesn't
work and I've searched high and low to see how to get it to do so.

The reason I don't just use DOMAIN= 'awk blah blah blah' is I want to set
more than one shell variable for each record.  But I have to get this
working first.  :(

#!/bin/bash

awk '{FS=":"}{system ("DOMAIN=" $1); }
        {system ("DOMAIN="$1)};
        {system ("echo \"$DOMAIN\"")};
' /etc/passwd

Any help would be appreciated.




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux