Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. GirlInTrouble

    FInger and cut (sounds painful doesn't it)

    ;-) I was holding off trying to learn perl until I was proficient at shell! (BTW it looks scary!) Are you saying its easier to do it in perl or impossible to do it in ksh? I figured something in awk might do it don't you think? I had a really good photocopy from an old sco manual about awk. Lost...
  2. GirlInTrouble

    FInger and cut (sounds painful doesn't it)

    Hi Neil, determined aren't you (thanks) Hope this isn't too much info for you. At least you can get a better feel for what I'm TRYING to do ;-) BTW IT IS actually slightly better formatted than you can see here. This is what I get from your 2nd command who -q | grep -v "#" | xargs finger -s |...
  3. GirlInTrouble

    Reading data from a file

    Your delimiters are a bit strange, its hard to understand your data, perhaps you might clarify what you see as an individual field. Are you using the colon to delimit your fields? All your records are all the same length. More info might help.
  4. GirlInTrouble

    FInger and cut (sounds painful doesn't it)

    Hey there what happened to you guys, did you wimp out or did you just think I was being lame ;-) I probably was, I had to finish this in a hurry. Anyhow just to let you know, I might be slow but not stupid, so here's my answer: PS I'm brand new to awk and sed and had to scratch my head but I had...
  5. GirlInTrouble

    FInger and cut (sounds painful doesn't it)

    It looks like the who and the finger together are overkill, it seems to be resulting in duplicate lines. I've chopped off the who from the from the front (to the finger - even worse amputation) , now I get less lines than tty sessions. Perhaps theres a flag on finger...I'm gonna keep at it.
  6. GirlInTrouble

    FInger and cut (sounds painful doesn't it)

    OK, I get it, if it doesn't look how you want you MAKE IT look like you want! Ok so I'm trying to make it look nice and I have broken it! I seem to have more lines comming back than user sessions %) who |awk '{print $1}'|xargs finger -s|tail +2|sed -e 's/-/ /'|awk '{printf "%10s %10s %-8s...
  7. GirlInTrouble

    FInger and cut (sounds painful doesn't it)

    I guess it's probably easier to get the full name from the passwd file, it just seems to be a little uncessacary as I'm already looking at finger.
  8. GirlInTrouble

    FInger and cut (sounds painful doesn't it)

    Heres an example of what I get: Login Name TTY root Super-User console root Super-User pts/2 root Super-User console root Super-User pts/2 joe Joe Bloggs I het joes last name not his tty... I want also want the * on the tty which says he's not accepting messages.
  9. GirlInTrouble

    FInger and cut (sounds painful doesn't it)

    Hi Toolkit Oh my God I've been laughing because I've never seen this tail +2, man page here I come. It works except for real users (ie. non root) it gives me thier login name, first name and second name, but not their tty , (which I DO get for root) which I expecially want as it is prefixed...
  10. GirlInTrouble

    FInger and cut (sounds painful doesn't it)

    Hi there you guys ;-) Im trying to get the first 3 fields from a finger -s command I've tried using cut but that doesn't work. who |cut -d" " -f1|xargs finger -s|cut -d" " -f1,2,3 The output of finger is seperated with multiple spaces. Do I used IFS again? How do I say my delimiter is junk...
  11. GirlInTrouble

    Using a select loop with input from the 'file' command

    Hi there and thanks to everyone who posted :-) Ok I tried all the ideas except the perl one (only bcos I haven't got to perl yet!) Looks like you guys have cracked it, I was obviously making it TOO complicated. I havn't used the pr command much so will be checking out the man page in a sec to...
  12. GirlInTrouble

    Using a select loop with input from the 'file' command

    Hi everyone My head is getting to know the brick wall rather well by now. My problem is all do to do with passing a list of files using the file command into a select loop. Now I can make the file command give me what I think works because I hard coded it into 2nd script, it doesn’t look pretty...

Part and Inventory Search

Back
Top