Sponsored Content
Top Forums UNIX for Dummies Questions & Answers String manipulation using ksh Post 302237419 by zambo on Wednesday 17th of September 2008 03:57:27 PM
Old 09-17-2008
String manipulation using ksh

I have a UNIX shell where:
LEVEL=dev
SITE=here
and WHEREIAM=/tmp/$SITE/location/$LEVEL

I want to echo $WHEREIAM in such a way that I get it back with all the environment variables resolved (/tmp/here/location/dev).
This command will be used in a shell script.
 

10 More Discussions You Might Find Interesting

1. Programming

string manipulation in C

Hi all, i have the following string as input : "<iframe src="http://abcdef.com/asd/aaa/awerftya0480000008ave/direct;wi.120;hi.600/01?page=" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" allowtransparency="true" width="120" height="600"> <script... (1 Reply)
Discussion started by: trinath
1 Replies

2. Shell Programming and Scripting

String Manipulation

Hi, Suppose I have the following text in a file. ORA-00942: table or view does not exist ORA-01555: snapshot too old: rollback segment number string with name "string" too small Is there any way I can list all the text that starts only with 'ORA-'? Or there any grep command that can... (7 Replies)
Discussion started by: kakashi_jet
7 Replies

3. Shell Programming and Scripting

string manipulation

Hello, I have a korn shell string variable str1 = "A,B,Z" I would like to create another korn shell string variable str2 = "letter = 'A' or letter = 'B' or letter = 'Z' " Please help! Thanks in advance an UNIX newbie! (13 Replies)
Discussion started by: hai1973
13 Replies

4. Shell Programming and Scripting

string manipulation in ksh

Hi all, I'm trying to extract the name of a script that is being run with a full path. i.e. if the script name is /some/where/path/script_name.ksh I'd like to extract only: script_name i know that it is possible to do so in two phases: echo "${0##*/}" will give me script_name.ksh and... (4 Replies)
Discussion started by: iceman
4 Replies

5. Shell Programming and Scripting

Eval Tricky Manipulation of Arry in KSH - Help

Hi, Could any one share the intelligence to track this problem. I have any array BT_META_36 and it prints properly with contents of array. # print "BT_META_36=${BT_META_36}" # BT_META_36=cab3,cab4:HDS:052,07A cab3,cab4:HDS:052,07A Now I have a BT_META_36 assigned to a variable.... (0 Replies)
Discussion started by: ajilesh
0 Replies

6. Shell Programming and Scripting

Help With String Manipulation

Hi Guru's, I need some help with data manipulation using shell scripting. I know how to replace the whole string but not part of the string. The value after aa= should be replaced with the value in the mail leaving ,OU=111,OU=222,DC=333 as is. Below are the inputs and expected outputs. Input:... (17 Replies)
Discussion started by: Samingla
17 Replies

7. Shell Programming and Scripting

String manipulation using ksh script

Hi, I need to convert string "(joe.smith" into "joe_smith" i.e. I need to remove the leading opening brace '(' and replace the dot '.' with an under score '_' can anyone suggest a one liner ksh script or unix command for this please (3 Replies)
Discussion started by: sdj
3 Replies

8. Shell Programming and Scripting

String manipulation

Hello Could you help with small script: How to split string X1 into 3 string String X1 can have 1 or many strings X1='A1:B1:C1:D1:A2:B2:C2:D2:A3:B3:C3:D3' This is output which I want to have: Z1='A1:B1:C1:D1' Z2='A2:B2:C2:D2' Z3='A3:B3:C3:D3' (5 Replies)
Discussion started by: vikus
5 Replies

9. Shell Programming and Scripting

Deleting part of a string : string manipulation

i have something like this... echo "teCertificateId" | awk -F'Id' '{ print $1 }' | awk -F'te' '{ print $2 }' Certifica the awk should remove 'te' only if it is present at the start of the string.. anywhere else it should ignore it. expected output is Certificate (7 Replies)
Discussion started by: vivek d r
7 Replies

10. Shell Programming and Scripting

ksh String Manipulation - removing variables from within a variable

Hi. I'd like to remove all values in a string variable that also exist in a second variable. What is the appropriate approach to take here? I can use a 'For' loop and check each element and then populate a new string. But is there a cleaner, simpler way? E.g. I have the following 2 variables ... (19 Replies)
Discussion started by: user052009
19 Replies
ftpgroups(4)						     Kernel Interfaces Manual						      ftpgroups(4)

NAME
ftpgroups - group password file for use with the SITE GROUP and SITE GPASS commands. SYNOPSIS
DESCRIPTION
The file is the group password file for use with the SITE GROUP and SITE GPASS commands. To enable the use of this file, the entry must be made in the configuration file This file contains an alphanumeric string, encrypted password, and the actual group name from the file. Each entry is separated by After a user logs in, the SITE GROUP and SITE GPASS commands may be used to specify an enhanced access group and associated password. If the group name and password are valid, the user becomes (via a member of the group specified in the group access file, The format of the group access file is: where access_group_name is an arbitrary (alphanumeric and/or punctuation) string. encrypted_password is the password encrypted via crypt(3), exactly like in real_group_name is the name of a valid group listed in NOTE: For this option to work for anonymous FTP users, the ftp server must keep permanently open and the group access file is loaded into memory. This means that: (1) the ftp server now has an additional file descriptor open, and (2) the necessary passwords and access privileges granted to users via SITE GROUP will be static for the duration of an FTP ses- sion. If you have an urgent need to change the access groups and/or passwords *NOW*, then kill all of the running FTP servers. FILES
AUTHOR
was developed by the Washington University, St. Louis, Missouri. SEE ALSO
ftpaccess(4). ftpgroups(4)
All times are GMT -4. The time now is 06:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy