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...
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...
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...
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
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...
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...
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.
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.
###...
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...
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...
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
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...
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'...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.