I am facing one problem, can any one please suggest me the command for the same in unix. I am using Ksh.
I have a large file with the data that looks like below.
"ROTO2-2007f","_US01","9/15/2007","9/21/2007",346492,"NICK, LCD WATCH"97,1,"NAPOLITJ ","BERGER,M Z & CO INC",0.01,
... (2 Replies)
How...
can I read input by a user character by cahracter. And assign each character from the string to a variable?
Any help would be greatly appreciated!
Thank you! (1 Reply)
Hi all,
Does anyone know how to code in ksh that will remove the first character in a string variable and replace that variable without the first character?
Example:
var1=ktest1 will become var1=test1
var2=rtest2 will become var2=test2
Need help please. (10 Replies)
I haven't checked any installation script to see how this is done..
But I could not even do following simple task.
How do I Change existing variable value only when user enteres non-empty string. ?
#!/usr/bin/ksh
uid="scott"
# Assign new value user enters to uid, else leave it... (7 Replies)
Hallo!
Example.
#!/bin/bash
BACKUP_DIR=/home/userx/backups/evolution
echo $BACKUP_DIR
# delete the first character from the string
BACKUP_DIR=$(echo $BACKUP_DIR | cut -c 2-)
echo $BACKUP_DIR
It works. It does want I want, delete the first character from string in the... (11 Replies)
Hi.
How to change string variable in awk?
for example, I parse with awk script text file named some_name_with_extension.txt
I want to print only some_name in my script
....
varCompName = FILENAME
print varCompName
How to put not all symbols from FILENAME to variable?
thank you
This... (4 Replies)
echo "hello123" | tr -dc '' | wc -c
using this command i can count the no of times a number from 0-9 occurs in the string "hello123"
but how do i save this result inside a variable?
if i do
x= echo "hello123" | tr -dc '' | wc -c
that does not work...plz suggest..thanks (3 Replies)
I see a millioin ways to do this with echo, but what I wan to do is assign a variable the "nth" character of an incoming parameter to a ksh script.
$1 will be "pia"
I need to assign the first character to stmttype. (10 Replies)
Hello.
I have a string variable named L_TEMP to test a very simple filter.
L_TEMP="50AwL.|KWp9jk"
I want to insert a non printable character between K and W.
I have try this :
linux-g65k:~ # a='50AwL.|K'
linux-g65k:~ # b='Wp9jk'
linux-g65k:~ # L_TEMP="$a$'\x07'$b"
linux-g65k:~ # echo... (6 Replies)
Hello scripting geniusii! I come to kneel before the alter of your wisdom!
I am looking to take a keyword and replace characters within that keyword and add them to a string variable. I would like this to only go through however many characters the word has, which may vary in size.
... (10 Replies)
Discussion started by: ghaniba
10 Replies
LEARN ABOUT HPUX
putenv
putenv(3C)putenv(3C)NAME
putenv() - change or add value to environment
SYNOPSIS DESCRIPTION
string points to a string of the form name=value. makes the value of the environment variable name equal to value by altering an existing
variable or creating a new one. In either case, the string pointed to by string becomes part of the environment, so altering the string
changes the environment. The space used by string is no longer used once a new string-defining name is passed to
EXTERNAL INFLUENCES
Locale
The category determines the interpretation of characters in string as single- and/or multi-byte characters.
International Code Set Support
Single- and multi-byte character code sets are supported.
DIAGNOSTICS
returns non-zero if it was unable to obtain enough space via for an expanded environment, or if an invalid multibyte character sequence was
encountered in the string argument; otherwise it returns zero.
ERRORS
fails under the following conditions:
[ENOMEM] There is insufficient space to expand the environment.
[EILSEQ] An invalid multibyte character sequence was encountered in the string argument.
WARNINGS
manipulates the environment pointed to by environ, and can be used in conjunction with However, envp (the third argument to main) is not
changed.
This routine uses to enlarge the environment (see malloc(3C)).
After is called, environmental variables are not in alphabetical order.
A potential error is to call with an automatic variable as the argument, then exit the calling function while string is still part of the
environment.
SEE ALSO exec(2), getenv(3C), malloc(3C), environ(5), thread_safety(5).
STANDARDS CONFORMANCE putenv(3C)