okay, down below is the script. i have 32 words put into 32 variables and i want perl to print all those 32 variables into one text document, each word under another in the text file. the text files called times.txt Sorry about the length of the script
print " VToshiba ... (2 Replies)
Hi,
I'm trying to assign the permissions, owner and group of a file to seperate variables, but using
ls -l filename | awk '{print $1 "\t" $3 "\t" $4}'
gives the owner as tom.ja instead of tom.james
Is there any way to expand it so i get the full name, or is there an easier way to get them... (5 Replies)
Hi,
I need to place a number located in a text file in a variable so I can perform if/then comparison. How would I go about doing this? Using A=awk '{print $2}' maintenance_date.tmp does not seem to work.
Thanks (1 Reply)
I have a txt file
output.txt
Freq = 1900
L = 159I want to assign the values to a variable so that i can further use it in some other script.
like
F=1900
Len=159
etc
i tried doing something with awk but dosent work
F=$(awk 'BEGIN {}/Freq/ {split ($2,a);depth=a};printf "%d\t,... (2 Replies)
Okay, I've made threads on extracting fields and comparing strings in separate files in .csv's. I've written the following code with intentions of learning more.
I just want this one question answered: How can I assign fields from a file(comma separated) to variables?
My goal is to check... (0 Replies)
Hi! This might be a simple thing, but I'm struggling to assign values to variables from the file.
I've the following values stored in the file.. It consists of only two rows..
10
20
I want to assign the first row value to variable "n1" and the second row value to variable "n2"..
That is ... (3 Replies)
Hi,
I need to read two values,startdate and enddate from a param file and then write this value to another param file(global) under a specific workflow name.Here in global param file there is may workflow names, hence we need to check for the right one and then add the data below it.
Any... (5 Replies)
I have a file that has four values on each line and I'd like to give each column a variable name and then use those values in each step of a loop. In bash, I believe you could use a while loop to do this or possibly a cat command, but I am super new to programming and I'm having trouble decoding... (2 Replies)
I wrote a simply perl that searched a file for a particualr value and if it found it, rite it and the next three lines to a file. Now I have been asked to check those next three lines for a different value and only write those lines if it finds the second value.
I was thinking the best way to... (1 Reply)
So first: Sorry if the title is confusing...
I have a script I'm writing with a file with several names in it (some other info - but it's not really pertinent...) - I want to be allow the user to delete certain records, but I ran into a problem I'm not sure how to go about fixing.
If I were... (6 Replies)
Discussion started by: sabster
6 Replies
LEARN ABOUT OSX
base32hex
base32::hex(n) Base32 encoding base32::hex(n)
__________________________________________________________________________________________________________________________________________________NAME
base32::hex - base32 extended hex encoding
SYNOPSIS
package require Tcl 8.4
package require base32::core ?0.1?
package require base32::hex ?0.1?
::base32::hex::encode string
::base32::hex::decode estring
_________________________________________________________________DESCRIPTION
This package provides commands for encoding and decoding of strings into and out of the extended hex base32 encoding as specified in the
RFC 3548bis draft.
API
::base32::hex::encode string
This command encodes the given string in extended hex base32 and returns the encoded string as its result. The result may be padded
with the character = to signal a partial encoding at the end of the input string.
::base32::hex::decode estring
This commands takes the estring and decodes it under the assumption that it is a valid extended hex base32 encoded string. The
result of the decoding is returned as the result of the command.
Note that while the encoder will generate only uppercase characters this decoder accepts input in lowercase as well.
The command will always throw an error whenever encountering conditions which signal some type of bogus input, namely if
[1] the input contains characters which are not valid output of a extended hex base32 encoder,
[2] the length of the input is not a multiple of eight,
[3] padding appears not at the end of input, but in the middle,
[4] the padding has not of length six, four, three, or one characters,
CODE MAP
The code map used to convert 5-bit sequences is shown below, with the numeric id of the bit sequences to the left and the character used to
encode it to the right. The important feature of the extended hex mapping is that the first 16 codes map to the digits and hex characters.
0 0 9 9 18 I 27 R
1 1 10 A 19 J 28 S
2 2 11 B 20 K 29 T
3 3 12 C 21 L 30 U
4 4 13 D 22 M 31 V
5 5 14 E 23 N
6 6 15 F 24 O
7 7 16 G 25 P
8 8 17 H 26 Q
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category base32
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
KEYWORDS
base32, hex, rfc3548
CATEGORY
Text processing
COPYRIGHT
Copyright (c) Public domain
base32 0.1 base32::hex(n)