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 bkrike 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: *

  • Users: Czar24
  • Content: Threads
  • Order by date
  1. Czar24

    Check to see if a file exists

    Hey all, I'm writing a program which saves the output to a single file like "output.txt" I've been playing with the ios::nocreate and ios::noreplace but I can't get it to quite do what I want it to do (and yes I've included the #include <iostream> to activate them. What I'm trying to do is...
  2. Czar24

    Another challenge: Having awk determine file type?

    Is this possible? I want to have my awk script check to make sure the input file is a text file? I've been having a heck of a time trying to do this. I've been trying variations on the system command such as: (system("file " FILENAME)==*"text"*) to no avail. Any ideas? Thanks in...
  3. Czar24

    extracting lines before and after pattern.

    Here's what I'm trying to do. I'm printing a pattern out of a source file by matching it using: nawk' . . . /start_string/,/stop_string/{print > output.file} . . . ' input.file Sample input.file . . . 1111blah 1112blah 1113blah 1114header information 1 1115header information 2 1116blah...
  4. Czar24

    Easy way to print to a file in a subdirectory?

    In my awk script I would like to print a file to a subdirectory created by variables. instead of the command {print >> file} to print to a file in the current directory I'd like to send it to: /subdirectory1/subdirectory2/file where subdirectory1 and subdirectory2 are previously defined...
  5. Czar24

    Another AWK pattern matching issue

    I have another problem. I'm trying to extract a string to be used as part of a new file's name. For each type I know either the format of or the placement of the text. I can't use $1 for pulling out the numerical reference since there may or may not be a space at the end of the character...
  6. Czar24

    Help with CLOSE command in AWK

    Hey all, newbie to awk here. I'm trying to write an awk command that will split test out of a larger file and put it into smaller files based on start and stop sequences. I'm running into the system limitation of 10 files open and can't get the close() command to work. Any help is...

Part and Inventory Search

Back
Top