LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-12-2004, 02:22 AM   #1
luxpops
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
fullname:username:uid:groupname:gid:date_create
but I have no idea about the command to use

any helps will be apreciated
 
Old 09-12-2004, 04:46 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,788

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


Reply


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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:02 AM.

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