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 dencom 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: kobewins
  • Content: Threads
  • Order by date
  1. kobewins

    grub - booting Windows 2000 / RedHat Linux 8.0

    I had put this question on a Windows 2000 Server forum before, but no one can help me. I hope this is the right place this time. I got the grub message on my Dell SC600, on which I installed RedHat Linux 8.0 over Windows 2000 Server. It had been working perfectly on both Linux and Windows...
  2. kobewins

    Can’t boot PC – grub

    I got the grub message on my Dell SC600, on which I installed RedHat Linux 8.0 over Windows 2000 Server. It had been working perfectly on both Linux and Windows models before I got the “grub” message when I booted the machine. Once “grub” shows on the screen, I can’t do anything. However, I am...
  3. kobewins

    List the latest sub-directory using ls

    I have a directory that contains a lot of files/sub-directorys as following. drwxr-xr-x 2 dbl users 512 Aug 21 13:58 80 drwxr-xr-x 2 dbl users 512 Aug 21 14:19 81 -rwxr-xr-x 1 dbl users 116004 Aug 21 14:27 DEMO.sh drwxr-xr-x 2 dbl users...
  4. kobewins

    How to trim the leading spaces of a field?

    I have a file with some records, each of which has 13 fields seperated by "|": B|dbl|F0245|PDCS 123|DS0000002| 99||dbl||A|||| How can I trim the leading spaces of Field 6, before '99'? I just need 99: such as B|dbl|F0245|PDCS 123|DS0000002|99||dbl||A|||| Thank you David
  5. kobewins

    AWK array question

    I have the following two files, HAVING the exact format, WITH pipe "|" AS the field delimitor. Please help me out, what's wrong with my script? Thanks. WHAT I want IS: IF ( ($1=="F" for both files) && ($2 OF File_1.dat equals $2 OF File_2.dat) ) THEN print $5 in File_1.dat & File_2.dat FI...
  6. kobewins

    String substitution in shell script

    I have two shell variables(v1, v3). I want to substitue a part of one variable (v1) with the other(v3). let v1=NPDL0000000 let v2=12 let des= v3=`expr $v2 + 1` I would like des=NPDL0000013, which comes from NPDL0000000 (v1) 13 (v3) --------------------------- NPDL0000013...
  7. kobewins

    re-assign value to shell variable

    I am looking for the better coding to re-assign value to a shell variable, but not simply overwirte. For example: var=2 {code block} var=3 ### I don't want to simply overwirte var ### Instead : ${var:=3} {other code} Is that the out-of-date style? Are there better ways to do it? Many thanks.
  8. kobewins

    Parsing Error in AWK -- printf shell varaibles

    I have got the printf() error in AWK (AIX Unix). It seems that I will never get that AWK work with my user-defined shell variables. Please help!!! I was trying to print some fileds from input.dat into an output file. The other fields of the output file are from Unix shell variables. ###...
  9. kobewins

    AWK script to generate seqence numbers

    I am working a script to add a kind of sequence number as the third column to the data file, starting with a given number. The data file uses pipeline "|" as the field delimiter. 1|AUGMENTIN 250-62.5 TAB CHEW F| | 2|AUGMENTIN XR 1,000-62.5 TAB F| | 3|AXERT...
  10. kobewins

    sed: 0602-404 Error

    Hi, I was trying to use the following sed commands: sed ' 1,2d /^ *$/d /spool/d s/^ *// s/ *$// ' $DESC_F > $FIELDS_F Note: 1,2d # to delete Line# 1 and 2 But got the...
  11. kobewins

    Can I read a specific line (ex, Line #12) in Unix shell?

    I have a huge file (about 25 millions lines). Is this a way to read Line n directly, without looping througth each line of the file? Any ideas are appreciated. David
  12. kobewins

    Read a given line and the next line from a file

    Hi, Please help me on this script. I need to read a given line and the next line (if applies) from a file, based the line number given in the other file. (more details are included in the description of the code) I have got it work, but very slowly on large size of data. I knew the problem was...
  13. kobewins

    Modify the 1st column based on the 2nd column

    Hi, I need some ideas and help for creating a unix script. I have the following input file. I need the output like this: if the first column is 'R', print 'R'; if the first column is 'A', then check the 2nd column if 2nd col contains 'FA0', print 'R' 'FA01FBxx' else, print 'A'...
  14. kobewins

    Can I Concatenate the lines with the same line# from 2 different files

    Hi, I need to concatenate the lines with the same line# from 2 different file(as following). The Output_File is what I would like to have. How I do it? Thanks David --- FileA 1 2 3 4 FileB Something --> 123A... Thething --> 234B... otherThing --> 222C Nothing --> 321C Output_File 1...
  15. kobewins

    How can I get the next line of a particular line?

    Hi, I'm using the following File infile1 (sam_rpt) to get the line number ($ln) for File infile2 (loadPracNew.in), ie, the first number after 'Error Text: ' in infile2. In my example, $ln will be 1, and 5. #### Infile1: sam_rpt LOAD0007 RUN DATE: Dec 13, 2005 12:07:42...
  16. kobewins

    What's wrong with my regular expresion?

    Hi, I have a text input file (sam_rpt), containing data like: ----------------- LOAD0007 RUN DATE: Dec 13, 2005 12:07:42 PRIMARY KEY...
  17. kobewins

    Create a new file from two separate input files

    I'm a newbie for the scripting, but I have a task need to be done. Here is my problem, please help. I've got the following two input files. Input file_1 contains alot of IDs (11 digits), each in a separate line. In Input file_2, there is only one line. What I what to is open Input file_1...

Part and Inventory Search

Back
Top