Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    File Separators FS=":"

    hey Im trying to write a script where a batch of users are inputted from a textfile
    but i don't know how to use the file separator system?

    e.g. BEGIN{FS=":"}


    I understand the adduser command but can't find notes on what this type of processing is called

    some hints or sites with tutorials would be greatly appreciated
    please help.

  2. #2


    well aparently its part of an awk command,

    and I know that the awk command begins
    at BEGIN so I can test conditions first, and that the field separator is used to cycle records along with the Record Separator, but how do you get the script to execute against a file and grap each file?

    Does $1 refer to the first field in the input file?

  3. #3
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    awk -f <awk_program> input
    From the awk manual.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  4. $spacer_open
  5. #4


    Thats ok just don't tell my girlfriend, so the context of that command is for the input file, but if I wanted to test a condition against the inputted data:

    say checking a string for invalid data.
    can this be done with conventional constructs if else for etc?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts