Sponsored Content
Full Discussion: print user variable input
Top Forums UNIX for Dummies Questions & Answers print user variable input Post 302710171 by pamu on Thursday 4th of October 2012 04:32:01 AM
Old 10-04-2012
try using nawk
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Force Input in User Defined Variable

In a line such as: echo -n "How many days back would you like to check? "; read days How can I ensure that the user has a.) entered a number between 1-30 (not 0 or 31+) and b.) has not just hit enter (ie set it to "") and if it's entered wrong, how do I start the if statement over? I... (10 Replies)
Discussion started by: earnstaf
10 Replies

2. UNIX for Dummies Questions & Answers

Parsing name and phone as input and then print sub and marks out

I have a file like this : name phone id sub marks abc 2345 45 mat 90 bgt 6573 54 eng 89 ... .... .. ... .. ... .... .. ... .. Now i need to take in name and phone as input and then print sub and marks out, can u give me a sample code for this. P.S. If there are two of with same... (2 Replies)
Discussion started by: SasankaBITS
2 Replies

3. Shell Programming and Scripting

How to get the user input recursively until the user provides valid input

Hi, echo "Enter file name of input file list along with absolute path : " read inputFileList if then for string in `cat inputFileList` do echo $string done else echo " file does not exist" fi From the above code, if the user enters a invalid file... (1 Reply)
Discussion started by: i.srini89
1 Replies

4. Shell Programming and Scripting

Script interacts with user , based on user input it operates

i have a script which takes input from user, if user gives either Y/y then it should continue, else it should quit by displaying user cancelled. #!/bin/sh echo " Enter your choice to continue y/Y OR n/N to quit " read A if then echo " user requested to continue " ##some commands... (7 Replies)
Discussion started by: only4satish
7 Replies

5. Shell Programming and Scripting

How to print column by getting user input.?

Hi.. I have data file.. and I could able to print using cat and awk like this cat filename awk '{print $1 "\t" $2 "\t" $3}' filenamebut I want to receive input from user like this echo -n " how many columns you want to display : " read abcsuppose if I give all, it should display all... (11 Replies)
Discussion started by: Akshay Hegde
11 Replies

6. Shell Programming and Scripting

awk print variable then fields in variable

i have this variable: varT="1--2--3--5" i want to use awk to print field 3 from this variable. i dont want to do the "echo $varT". but here's my awk code: awk -v valA="$varT" "BEGIN {print valA}" this prints the entire line. i feel like i'm so close to getting what i want. i... (4 Replies)
Discussion started by: SkySmart
4 Replies

7. Shell Programming and Scripting

XML variable for input in same input file

Dear All , i stuck in one problem executing xml .. i have input xml as <COMMAND name="ARRANGEMENT.WRITE" timestamp="0" so="initial"> <SVLOBJECT> <LONG name="CSP_PMNT_ID" val="-1"/> <MONEY name="CSP_CEILING" amount="0.0" currency="AUD"/> ... (6 Replies)
Discussion started by: arvindng
6 Replies

8. Shell Programming and Scripting

To print value for a $variable inside a $variable or file

Hi guys, I have a file "abc.dat" in below format: FILE_PATH||||$F_PATH TABLE_LIST||||a|b|c SYST_NM||||${SRC_SYST} Now I am trying to read the above file and want to print the value for above dollar variables F_PATH and SRC_SYST. The problem is it's reading the dollar variables as... (5 Replies)
Discussion started by: abcabc1103
5 Replies

9. UNIX for Advanced & Expert Users

Passing variable as input & storing output in other variable

I have a below syntax its working fine... var12=$(ps -ef | grep apache | awk '{print $2,$4}') Im getting expected output as below: printf "%b\n" "${VAR12}" dell 123 dell 456 dell 457 Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies

10. Shell Programming and Scripting

User input and run awk using the input

I am trying to allow a user to enter in text and then store that text in a variable $gene to run in an awk command in which those values are used to run some calculations. I am getting syntax errors however, when I try. Thank you :). The awk runs great if it is a pre-defined file that is used,... (7 Replies)
Discussion started by: cmccabe
7 Replies
base32::core(n) 						  Base32 encoding						   base32::core(n)

__________________________________________________________________________________________________________________________________________________

NAME
base32::core - Expanding basic base32 maps SYNOPSIS
package require Tcl 8.4 package require base32::core ?0.1? ::base32::core::define map forwvar backwvar ivar ::base32::core::valid string pattern mvar _________________________________________________________________ DESCRIPTION
This package provides generic commands for the construction of full base32 mappings from a basic mapping listing just the codes and associ- ated characters. The full mappings, regular and inverse, created here map to and from bit sequences, and also handle the partial mappings at the end of a string. This is in essence an internal package to be used by implementors of a base32 en- and decoder. A regular user has no need of this package at all. API
::base32::core::define map forwvar backwvar ivar This command computes full forward and backward (inverse) mappings from the basic map and stores them in the variables named by for- wvar and backwvar resp. It also constructs a regexp pattern for the detection of invalid characters in supposedly base32 encoded input and stores it in the variable named by ivar. ::base32::core::valid string pattern mvar This command checks if the input string is a valid base32 encoded string, based on the pattern of invalid characters as generated by ::base32::core::define, and some other general rules. The result of the command is a boolean flag. Its value is True for a valid string, and False otherwise. In the latter case an error message describing the problem with the input is stored into the variable named by mvar. The variable is not touched if the input was found to be valid. The rules checked by the command, beyond rejection of bad characters, are: [1] The length of the input is not a multiple of eight, [2] The padding appears not at the end of input, but in the middle, [3] The padding has not of length six, four, three, or one characters, 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 CATEGORY
Text processing COPYRIGHT
Copyright (c) Public domain base32 0.1 base32::core(n)
All times are GMT -4. The time now is 12:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy