Search Results

Search: Posts Made By: leshy93
973
Posted By leshy93
Inserting script variables into database
I have a script working out ink percentages
#!/bin/bash
currentcyan=$'iso.3.6.1.2.1.43.11.1.1.9.1.1 = INTEGER: 990'
currentmagenta=$'iso.3.6.1.2.1.43.11.1.1.9.1.2 = INTEGER: 972'...
1,332
Posted By leshy93
I finally understood how ##* works and corrected...
I finally understood how ##* works and corrected my code:
cyanperc=$(( ${currentcyan##* }*100/${maxcyan##* } ))
Worked perfectly fine :)

Thank you for your help and for not telling me what was...
1,332
Posted By leshy93
Guys, thank you for the responses but I've been...
Guys, thank you for the responses but I've been an idiot. With my mind in chaos I mistyped the outcome of the command.

The correct format is iso.3..6.1.2.1.43.11.1.1.9.1.1 = INTEGER: 235

Same...
1,332
Posted By leshy93
Thank you for the information. I'm working on...
Thank you for the information.
I'm working on a Raspberry Pi 3 running Ubuntu Mate. GNU, version 4.3.46(1)

From the bash script I run:
first command currentcyan=$(snmpwalk -v1 - c public...
1,332
Posted By leshy93
Extracting vaules from end of string
I'm trying to write a script which will calculate percentages from a printer.
I have a command snmpwalk -v1 -c public 192.168.0.20 1.3.6.1.2.1.43.11.1.1.9.1.1

which returns (current ink level):...
Showing results 1 to 5 of 5

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