Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-12-2004, 02:22 AM   #1
LQ Newbie
Registered: Sep 2004
Location: new zealand
Distribution: red hat fedora
Posts: 9

Rep: Reputation: 0
Unhappy gawk question

Hi, I made a script using gawk to add user from an input file

now need to create a report for what I have done
here is my line of code
system("echo " $4 ":" $1 ":" $3 " >> report");
the arguments are take from a file with usernameassword:group:fullname

what I need more is to show uid, gid and the date so that each line in the report look like
but I have no idea about the command to use

any helps will be apreciated
Old 09-12-2004, 04:46 AM   #2
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,703

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
The three pieces of data missing can be retrieved with the shell commands:
id -u username
id -g username


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
where is curl and gawk ???????? bozart ROCK 11 10-23-2005 10:41 PM
Calling GAWK gurus! ericcarlson Linux - Software 2 09-13-2004 03:54 AM
How to search for asterisks using gawk dtheorem Linux - General 1 03-05-2004 02:35 PM
FS=? in gawk realos Programming 2 05-28-2003 07:30 PM
Gawk install problem safrout Linux From Scratch 5 09-08-2002 08:11 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration