Search Results

Search: Posts Made By: ReV
8,666
Posted By ReV
Hi, I have realised that this script will...
Hi,

I have realised that this script will create one output file which is the last entry in the input file. However, I need to create one ķutput file for each line. The names of the output file need...
8,666
Posted By ReV
Ah... I have got it! the field separator should...
Ah... I have got it! the field separator should be IFS=";" format. Thanks a lot for the help!
8,666
Posted By ReV
I have checked the IFS. It is correct. I am...
I have checked the IFS. It is correct. I am confused :confused: :confused:
8,666
Posted By ReV
Hmm.. it seems like all the variables are not...
Hmm.. it seems like all the variables are not assigned. echo produce empty values through the while loop.
8,666
Posted By ReV
Hi, I have tried with function header { ...
Hi,

I have tried with
function header {
echo "$HEADER" > $OUTPUTFILE
echo "$@" >> $OUTPUTFILE
echo "\">" >> $OUTPUTFILE
}

but the parameters are not parsed from the input to the ouput...
8,666
Posted By ReV
There are some changes in the requirements of the...
There are some changes in the requirements of the output file. One more fields needed.
There are also 2 more fields in the input file and the 2nd line is not needed.

This is what I have done:
...
8,666
Posted By ReV
Hi, I couldn't get the 2nd field into the...
Hi,

I couldn't get the 2nd field into the output file. Can you please advise on how to add the 2nd field and so on?
8,666
Posted By ReV
Hi, I cannot install it because I am not...
Hi,

I cannot install it because I am not the system admin. And I am using a server from the company. I guess I can't use Ruby. :(
8,666
Posted By ReV
I can't seem to use it in my unix interface. What...
I can't seem to use it in my unix interface. What should I do?
8,666
Posted By ReV
What is ruby command? When I tried to enter the...
What is ruby command? When I tried to enter the command line you have written, it says "ruby:command not found"
8,666
Posted By ReV
Creating file contents using contents of another file
Hi,

I am not sure how to start doing this so I hope to get some advice as to how to start.

I have 2 files. The source file contains data that I needed is in columns delimited by ";". For...
3,349
Posted By ReV
I have changed the script and it look like this...
I have changed the script and it look like this now:

#!/usr/bin/ksh
. /opt/Modules/init/ksh

SF_BASAR=/opt/basar/silicon_foundry
UMC_MASK=/home/umc/dropbox/test...
3,349
Posted By ReV
problem with script and syntax error message
Hi I have the following script and have problem debugging the problems. The function of this script is to make sure the entire file is being received (the filesize of a data is not changing after 20...
3,950
Posted By ReV
Hi all, Thanks!. I used: #!/usr/bin/ksh ...
Hi all,

Thanks!. I used:
#!/usr/bin/ksh
egrep "$(<file2)" file1 > File3
mv -f file3 file1

and it works. However, when I tried to put into file1 and file2 irrrgular names, like...
3,950
Posted By ReV
Hi, I tried what you have suggested and get...
Hi,

I tried what you have suggested and get the following:
% cat file1
item4
item5
% cat file2
item2
item3
item5
item6
% testscript
item5
% cat file1
item4
item5

but the contents...
3,950
Posted By ReV
hmm.. but I can't test this command in Unix?
hmm.. but I can't test this command in Unix?
3,950
Posted By ReV
This is what I get: % cat file2 item2 ...
This is what I get:

% cat file2
item2
item3
item5
item6
% cat file1
item4
item5

% egrep "$(<file2)" file1
Variable syntax


I am using unix to do this command
3,950
Posted By ReV
Hi, thanks for your help but when I tried to use...
Hi, thanks for your help but when I tried to use this command, it say syntax error.

I tried using this command instead:

egrep "(<file2)" file1

but both the contents in file1 is not changed. ...
3,950
Posted By ReV
Comparing items in 2 files
Hi,

I have 2 files with contents in them and I need to compare each item in each file.

File1:
item4
item5

File2:
item2
item3
item5
item6

The items names can be of different lengths....
1,905
Posted By ReV
Hi, I tried with this: sed '1h;g' $file...
Hi,

I tried with this:

sed '1h;g' $file > $TMP/field.A

and it seems ok.

May I know what is the difference with sed -n '1h;1!{g;p}' ?
1,905
Posted By ReV
duplicating 1st row of data
Hi,

I have data in the following format:

data1
data2 data3 data4
data5 data6
data7 data8 data9
data10

I require the final output to be:

data1
data1
data1
data1

i...
7,815
Posted By ReV
Hi, I have gotten help from another forum...
Hi,

I have gotten help from another forum and it seems to be the correct method! It shd also be similar to what is being suggested in this thread too! I am pasting the code here so that in future,...
7,815
Posted By ReV
Hi, Thanks all for the helpful solutions....
Hi,

Thanks all for the helpful solutions. The fields in each line are all starting in the same columns but they are of different lengths.

for example (ccc is the field length and bbb is the...
7,815
Posted By ReV
there are no patterns, because all the fields are...
there are no patterns, because all the fields are numbers. they can either be blank or numbers.

however, the number of fields in each line is the same. i am not sure if this will be a helpful pt...
7,815
Posted By ReV
yes, exactly. the absence of field2 and 3 are not...
yes, exactly. the absence of field2 and 3 are not detected. thanks vino for explaining it :)
Showing results 1 to 25 of 34

 
All times are GMT -4. The time now is 09:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy