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 wOOdy-Soft 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: gawker
  • Content: Threads
  • Order by date
  1. gawker

    ksh - Reading/evaluating contents of input string for special characters

    Greetings. This is a question about the ksh environment. Let's say that I want to evaluate a path name provided to my script as shown here: ./test.ksh /tmp/user-data/stuff This prior example is straight forward as there isn't anything that needs to be interpreted. The script variable shows...
  2. gawker

    Create a tar file and pipe to compress command

    I need to create a tar file in a filesystem with limited room. Is there a way to send the tar file directly to the compress command so that the tar output is directly compressed (i.e., no intermediate file) and therefore smaller? Thank you. Gawker [pc2]
  3. gawker

    grep wild card?

    In a file, I have strings such as: abc_1234_xyx abc_34kk_xyx abc_q3_xyx I am trying to find a wild card pattern I can use so that a single grep can find strings with abc at the start and xyx at the end. The string length may vary. I was hoping there was something like grep "abc*xyz"...
  4. gawker

    Determine telnet window size.

    I hope that this is the correct forum for this... I'm writting a script that will list user data files in a directory. The script will allow the user to select the file using an associated number that is displayed next to the file name. I want to control how many files (lines) are displayed...
  5. gawker

    find for multiple trees

    I've a directory structure similar to this: /backup/test/servera/... /backup/test/serverb/... /backup/test/serverc/... /backup/test/serverd/... /backup/test/servere/... Using a single find command, is it possible to list just those files residing in /backup/test/serverb and...
  6. gawker

    Network connection drops when laptop inactive

    I've a IBM laptop that I use at work to connect via PCXware telnet sessions to various servers. When my PC is unattended for a time (for example lunchtime), my telnet sessions are no longer viable. The windows are still open, but when I try to do anything in one of the windows, the window is...
  7. gawker

    echo \c equivilent in awk?

    I've an awk process that does a number of system queries to build up a line of data and write out to a file. The format of the awk process is: awk ' { ... } ' >> work-file Since it takes a long time to gather the data, I'd like to use a process indicator to show that work is progressing so...
  8. gawker

    What order are files selected by tar?

    In what order are files selected from a directory by tar when creating a tar file of the directory? Thank you. Gawker [pc2]
  9. gawker

    Date/time manipulation - please repost solution.

    Last week, somebody was kind enough to post a snippet of PERL code on how to take a date/time value and subtract from it to get a date/time of (example) 10 minutes ago. My post on this question was deleted before I got to copy the response. [sad] Would that kind soul please repost his/her...
  10. gawker

    Count of array variables.

    Hi, If an array has been created in an awk process via the split command, is there a variable that reports on the number of array entries? I can get the information by reading the array with "while", but figure there must be a more direct way of getting the value. Thanks! [pacman]...
  11. gawker

    Ignoring "(" in a variable when used in a system call.

    Hi, In a awk process, I am reading data from a file where some of the data lines contain text bracketed by parenthesis like the following example: ...SysKonnect PCI FDDI Adapter (48110040) I set up a variable: Adapter_Desc = substr($0,30,length($0)) And then try to echo the data via a...
  12. gawker

    Field separator

    Hi, I want to read a file that contains email addresses and create a single string variable that contains all of the address, each address with a trialing space. The data in email_aix_users.lst looks like: user1@my.com user2@my.com ... And the code looks like: MAIL_LIST=`awk ' { print $0 } '...
  13. gawker

    Reading line format characters in /etc/printcap

    Greetings All. Using a shell script and awk, I am trying to do a locate/compare certain information contained in the /etc/printcap file on a LINUX system. The file is specially formated, so I cannot search for " :" (colon with leading blank) as what appears to be leading blanks on...
  14. gawker

    Function to function call

    Hi, I've a ksh script that contains two user functions that perform an awk process. example: function user1_function { awk ' { misc. code } ' } function user2_function { awk ' { print $0; user1_function } ' } user1_function is defined before user2 function. The call to...
  15. gawker

    Getting data from a system call

    Hi Gents, I'm working with awk in a LINUX 7.2 environment. In an awk execution, I get a printer id and print job number. I want to get the "rank" information on the job from the execution of an lpq statement. (The lpq data looks like: 1st root 4 .bash_profile 240 bytes) I've...
  16. gawker

    sed string substitution - keeping a double quote

    Hi, I am working on a script, part of which does a string replacement. The user needs the ability to: 01) Enter a string that optionally contains embedded spaces. 02) Enter a string that optionally contains a double quote. The following works just fine for (01): Example: Change occurances...
  17. gawker

    Passing variable out of AWK to shell

    Hi, I have an AWK process in a shell script. Part of the function is to determine the position of a character string on a line. For example: awk ' { BytePos = match($0,"a") print BytePos } ' string.dat I want to access the value of the BytePos variable by...

Part and Inventory Search

Back
Top