Search Results

Search: Posts Made By: luna_soleil
2,205
Posted By luna_soleil
Thanks ygemici, i've tried your code and that...
Thanks ygemici, i've tried your code and that works too! Thanks so much for your reply :)
2,205
Posted By luna_soleil
Oh sorry guys, I should be using nawk instead of...
Oh sorry guys, I should be using nawk instead of awk. Pardon my silliness :P.

I will try once again your scripts and let you know the outcome :-)

---------- Post updated at 10:13 PM ----------...
2,205
Posted By luna_soleil
How to change values in datafile from source file
Hi all,

I have this source file source.txt :

hdrEthernetSwitch1IPAddress 112.13.9.34
hdrEthernetSwitch2IPAddress 112.13.8.245
noOfRevASLAvailable 8000
noOfRevASLInUse 122
maxDOSPayload...
4,389
Posted By luna_soleil
Hey GURU once again you do a magic for me, that...
Hey GURU once again you do a magic for me, that WORKS! Thank you so much!

Hahahah yeah.. now I have to remove all the files because it is work datafile, it supposed to be confidential :P
4,389
Posted By luna_soleil
Hi Guru, I need 1 more help.. I promise this...
Hi Guru,

I need 1 more help.. I promise this is gonna be the last time I bug u :P

My source file :
edited, confidential datafile

My destination file :
edited, confidential datafile
...
4,389
Posted By luna_soleil
Guru, That works! :b: Thank you so much for...
Guru,
That works! :b:
Thank you so much for helping me!:o
U are a real genius! :b::D
4,389
Posted By luna_soleil
Thanks Guru.. this is what i did to the...
Thanks Guru..

this is what i did to the script :
echo "Enter filename that you want to modify"
read destfile
nawk 'NR==FNR{a[$1]=i++;next}{print $1, (a[$1])?a[$1]:$2}' FS=," " OFS=," " i=240000...
4,389
Posted By luna_soleil
Hi Guru, It's not working :(.. It is still...
Hi Guru,

It's not working :(..
It is still showing null values to
Goat,
Camel,
Wombat,
4,389
Posted By luna_soleil
Hi Guru n everybody I have problem where...
Hi Guru n everybody

I have problem where the script also change the values of other unrelated fields as below :

Source file :
Kitten
Dogs
Donkey
Chicken
Turkey

Destination file :...
4,389
Posted By luna_soleil
This works!! THANK U SO MUCH GURU! I appreciate...
This works!! THANK U SO MUCH GURU! I appreciate so much! :-)
4,389
Posted By luna_soleil
Hi Guru, thanks so much! Now the screen print out...
Hi Guru, thanks so much! Now the screen print out the values :

flexpm@kl-gauntletz-lucA$ ls
a1 a2
flexpm@kl-gauntletz-lucA$ nawk 'NR==FNR{a[$1]=i++;next}{print $1,a[$1]}' FS=,...
4,389
Posted By luna_soleil
Thanks Guru for your reply :-) But in a2...
Thanks Guru for your reply :-)

But in a2 (destination file), after running script i got empty values like this :
Kitten,
Dogs,
Donkey,
Chicken,
Turkey,
Kitten,
Dogs,
Donkey,
Chicken,...
4,389
Posted By luna_soleil
Perl script to change values in datafiles
Hi all,

Let say I have 2 files, 1 is source file and another is destination file.

Source file contains the following :
Kitten
Dogs
Donkey
Chicken
Turkey

And destination file contains :...
2,180
Posted By luna_soleil
new values would be: A1000001EFFFF1 ...
new values would be:
A1000001EFFFF1
A1000002000000
A1000002100000
A1000002200000
A1000002300000
2,180
Posted By luna_soleil
How to change values in certain column only in every line (any script)
Let say in a file I have lines of data like this :

13;2073;461496;15075341;3;001f7d3a;2042063674;
13;2074;461446;15080241;6;001ed33a;2042020154;
13;2075;461401;15085270;6;001f593b;2042054459;...
8,356
Posted By luna_soleil
How to display values from user input array?
Hi all,

I wrote a script that reads inputs from user and store in array named "input". The number of elements in the array is not fixed - determined only after user exit the while loop that reads...
1,536
Posted By luna_soleil
Hi, Thanks for your help, but when I run...
Hi,

Thanks for your help, but when I run this it and type "end" to exit the loop it won't exit but prompting for another input as below:

$ while [ "${name[$x]}" != "end" ]
> do
> read...
1,536
Posted By luna_soleil
Help me with while loop
Hey ya..

I need to perform while loop that will continue receiving input until "end" is entered. The input is stored in arrays name[1], name[2], name[3]... etc. My script is as below:

x=1...
1,519
Posted By luna_soleil
hey amitranjansahu.. your code works! thank...
hey amitranjansahu..

your code works! thank you very much friend for your help :)
1,519
Posted By luna_soleil
How to make sure dir is really empty
Hi,

I have this piece of shell script:

#!/bin/ksh

x[1]=data1
x[2]=data1
x[3]=data1

for i in 1 2 3
do
cp x[i] $IN_DIR
done
PerformNextTask

$IN_DIR is already designed to...
2,466
Posted By luna_soleil
Thanks jim and franklin for your help.. I've...
Thanks jim and franklin for your help.. I've learnt new things and get my code fixed from you two.. thank u so much
2,466
Posted By luna_soleil
Comparing 2 words
Hi

I have assigned list of arrays as below:
rtab[1]="TAB1 Y"
rtab[2]="TAB2 Y"
rtab[3]="TAB3 Y"
rtab[4]="TAB4 Y"

And I have a text file comp.txt that contains
>vi comp.txt
TAB1 Y
TAB2...
3,252
Posted By luna_soleil
Thank u very much ce9888, i could use that too in...
Thank u very much ce9888, i could use that too in my script.. i've learnt something new today.. thanks again ;)
3,252
Posted By luna_soleil
Hi Lakris, This works as well.. thank u...
Hi Lakris,

This works as well.. thank u thank u so much.. appreciate your reply :D:cool:
3,252
Posted By luna_soleil
It works! Thank you so much John. Really...
It works!
Thank you so much John. Really appreciate your help :D:b:
Showing results 1 to 25 of 48

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