Search Results

Search: Posts Made By: ggoliath
2,920
Posted By ggoliath
I did the following! Created a printer on...
I did the following!

Created a printer on my remote server.I ran the script on the local server and was happy that it created the printer on the local server just as, it was created on the remote...
2,920
Posted By ggoliath
YES, YES....:D Its now re-creating the printer...
YES, YES....:D
Its now re-creating the printer because it does not exists.
Will it delete the printer if its exists and re-create it again??????
2,920
Posted By ggoliath
OK and if the condition does not exists, but i...
OK and if the condition does not exists, but i would like to still recreate it !
would it change the create statement?????
here is both the delete and create statements

#Delete or Create Printer...
2,920
Posted By ggoliath
Alternative to && operator
"Both cases have to be true for the expression to evaluate "true". is that not so.
the following code does a read from a txt file, an then suppose to do the deletion ,but although the condition...
3,198
Posted By ggoliath
My orginal post was that i needed the awk to show...
My orginal post was that i needed the awk to show the differences between the two out files namely sun5-printers.txt and sun8-printers.txt

device for 0606ge1: lpd://172.28.9.29:515 (from...
3,198
Posted By ggoliath
Hi franklin52, you asked for some lines from...
Hi franklin52,
you asked for some lines from the input files??? which i posted
and after running the awk, is the differences which it gives me..is also what i posted

or am i wrong????
1,106
Posted By ggoliath
Deletion and recreation within a script
All printers are created on the PROD server and my script must pick up the differences in a diffs.txt file
delete the printer if exist on the DEV server
recreate it as it currently stands on the...
3,198
Posted By ggoliath
Here some lines from the text files: this is...
Here some lines from the text files:
this is the local server:

tail -20 sun5-printers.txt
device for 5001jnl: lpd://172.25.12.27:515
device for 5001pr1: lpd://172.25.6.28:515
device for...
3,198
Posted By ggoliath
Thanks franklin52, I tried, the AWK as you...
Thanks franklin52,

I tried, the AWK as you suggested, BUT
now its ignoring the duplicates, as per example i posted.

device for 0601jc1: lpd://172.25.53.33:515
device for 0601jc1:...
3,198
Posted By ggoliath
I've been doing some research for the last three...
I've been doing some research for the last three hours..keep on running into a brick wall.
Can someone please tell me how I can fix the awk command not to produce the duplicates, and only show the...
3,198
Posted By ggoliath
ok ran command and now i see the differences! ...
ok ran command and now i see the differences!
thanks a million

device for 0601dn1: lpd://172.25.53.32:515
device for 0601jc1: lpd://172.25.53.33:515
device for 0601la1: lpd://172.25.53.34:515...
3,198
Posted By ggoliath
The expected functionality is too display,...
The expected functionality is too display, differences in both the remote server and the local server.
oh okay, how can i change the awk command , so that it will display differences in the...
3,198
Posted By ggoliath
Data differences
I have the following awk command, reading data from my local server(sun5) and remote server(sun8).Each doing the same command and displaying the differences into a diffs.txt file.


awk 'BEGIN...
3,137
Posted By ggoliath
Will give it a shot.thanks ---------- Post...
Will give it a shot.thanks

---------- Post updated 05-28-10 at 09:51 ---------- Previous update was 05-27-10 at 15:51 ----------

Gave it a bash, and it worked fine for deleting 1 printer at a...
3,137
Posted By ggoliath
how to combine two scripts into one
I need to combine two scripts, into one script. One is to delete something, the to recreate. Here is the scripts:

BIN=/usr/lbin
LINE='device for 0101a01: lpd://172.25.41.111:515'
while read LINE...
8,462
Posted By ggoliath
I recently acquired a book, "Linux Shell Script...
I recently acquired a book, "Linux Shell Script Programming"
its very useful. Supplied by Thomson course technology
I also came acroos a few PDF's which were helpful:D
5,277
Posted By ggoliath
thanks..this gave me exactly what i needed.:)
thanks..this gave me exactly what i needed.:)
5,277
Posted By ggoliath
here is the diffs file more diffs.txt ...
here is the diffs file

more diffs.txt
device for 0117bd1: lpd://172.25.29.60:515
device for 2001bl7: socket://172.25.44.188:9100
device for 2201bl7: socket://172.25.11.170:9100
device for...
5,277
Posted By ggoliath
ok here is the script BIN=/usr/lbin ...
ok here is the script

BIN=/usr/lbin
LINE='device for 0101a01: lpd://172.25.41.111:515'
prt=`echo $LINE | awk '{print $3 }' | cut -c 1-7`
#prt=$( $LINE | awk -F "[ :]" '{print $3'})
echo $prt...
5,277
Posted By ggoliath
I tried all of these with no success... ...
I tried all of these with no success...
herewith is output received with 1st option

+ 0< diffs.txt
+ read prt drv IP port
+ [ device = 0117bd1: ]
+ read prt drv IP port
+ [ device = 0117bd1:...
5,277
Posted By ggoliath
I tried , but its not giving me just the printer...
I tried , but its not giving me just the printer name , because that is what i actually just need.
My variable if tested gives me just that.

+ cut -c 1-7
+ awk {print $3 }
prt=0101a01
+ echo...
5,277
Posted By ggoliath
Select variable within a if statement
i want to select a variable created and use it in a if statement, but not getting the desired results


LINE='device for 0101a01: lpd://172.25.41.111:515'
prt=`echo $LINE | awk '{print $3 }' |...
1,663
Posted By ggoliath
Ok thanks, that works BUT BUT its not adding...
Ok thanks, that works BUT
BUT its not adding the printer with other three variables as specified in the lpadmin statement

$BIN/lpadmin -p "$P" -E -D "$drv"://"$IP":"$port"


here is the...
1,663
Posted By ggoliath
Variable from a text file
I have a variable from a txt file, can i create more variables from the same txt file?

diffs.txt
device for 0117bd1: lpd://172.25.29.60:515
device for 2001bl7: socket://172.25.44.188:9100...
2,651
Posted By ggoliath
thnak-you..it works
thnak-you..it works
Showing results 1 to 25 of 43

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