Search Results

Search: Posts Made By: PCGameGuy
2,908
Posted By PCGameGuy
Cool, that makes sense then. TMYK and all that....
Cool, that makes sense then. TMYK and all that. :) Oh, I noticed indentation on the code snippets provided. Is that a tab or just spaces? I figure it is for readability since my local guru tends...
2,908
Posted By PCGameGuy
Oh, I added my third variable when trying it. Is...
Oh, I added my third variable when trying it. Is it that $# won't trap all three? I take it using - eq 2 checks for existence?


if [ $# -eq 2 ]
then
decsite=$1
rawtype=$2
daterange=$3...
2,908
Posted By PCGameGuy
Awesome response, case is working great so far...
Awesome response, case is working great so far but the test fails. I forgot to mention I am using bash, sorry about that.

I give it command line entries and it still prompts and overwrites the...
2,908
Posted By PCGameGuy
Is it possible to prompt for input if not given on command line?
I have a script built that takes the standard inputs $1 $2 $3 after the name and parses some data.


hexsite=`echo "obase=16;$1"|bc`
hexfix=$(printf "%.3X" 0x$hexsite)
if [ "$2" == "1x" ] || [...
5,446
Posted By PCGameGuy
Just to provide resolution, I have gone with the...
Just to provide resolution, I have gone with the convert the decimal input option and after another day of learing this is what I came up with:


#!/bin/bash
echo "Site number:"
read decsite...
5,446
Posted By PCGameGuy
I am looking at bc now, converting dec input to...
I am looking at bc now, converting dec input to hex may actually be easier since I am completely untrained and new at this. I can strip off the 0x (actually just pull out the part where I added it)...
5,446
Posted By PCGameGuy
Heh, that is actually what I have been pondering...
Heh, that is actually what I have been pondering pretty heavily as an alternative actually. :)

My suggestion that end users learn hexadecimal before touching my script was denied, sadly.
5,446
Posted By PCGameGuy
Thank you for the reply, I am glad it was...
Thank you for the reply, I am glad it was awk/nawk and not me this time. :) Now to take your code and figure out how to make it work for me!
5,446
Posted By PCGameGuy
SunOS, looks like 5.10? Running on a Sparc...
SunOS, looks like 5.10? Running on a Sparc Netra-240. Let me clean up my post to clarify input > process > output. Thank you.

Oh and I am in zsh for editing but I can't guarantee what a user...
5,446
Posted By PCGameGuy
NAWK conversion of hexadecimal input to decimal output via printf, I am close I can feel it
I have searched and the answers I have found thus far have led me to this point, so I feel I am just about there.

I am trying to convert a column of hexadecimal to decimal values so that I can...
Showing results 1 to 10 of 10

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