Sponsored Content
Top Forums Shell Programming and Scripting Cut determinate values amb subst for ; Post 302708983 by capilla on Tuesday 2nd of October 2012 12:51:40 PM
Old 10-02-2012
Cut determinate values amb subst for ;

Hello
I have a output file that contains the next info:
Code:
host_name   LET-234-WDFD-2
 address    10.11.0.62
 host_name   XWERWE-234-WEDF-EMEEH-GIDF-3
 address    10.11.32.48
 host_name   DFG-745-WE-EMEEEH-GIDF-4
 address    10.11.32.176
        host_name                       DFDFG-ERWG-BL-ETH-01-FV
        address                         198.18.1.107
        host_name                       DFDFG-ERWG-BL-ETH-02-FV
        address                         198.18.1.108
        host_name                       DFDFG-WEFEW-WEFWEF-01-ASDS
        address                         10.11.0.108
 host_name   DFDFG-SDF-UKLY-01-FGG
 address    198.18.253.138
 host_name   DFDFG-SDF-UKLY-02-FGG
 address    198.18.253.139
 host_name   DFDFG-SDF-UKLY-01-GGHTFGH2

The objective is delete host_name & adress an put ; to separate host_name and address:
Code:
LET-234-WDFD-2;10.11.0.62
XWERWE-234-WEDF-EMEEH-GIDF-3;10.11.32.48
DFG-745-WE-EMEEEH-GIDF-4;10.11.32.176
DFDFG-ERWG-BL-ETH-01-FV;198.18.1.107
DFDFG-ERWG-BL-ETH-02-FV;198.18.1.108
DFDFG-WEFEW-WEFWEF-01-ASDS;10.11.0.108
DFDFG-SDF-UKLY-01-FGG;198.18.253.138
DFDFG-SDF-UKLY-02-FGG;198.18.253.139

I try with cut, but any result
Could you help me? Thanks

Last edited by Scrutinizer; 10-03-2012 at 07:02 AM.. Reason: code tags instead of quote tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command param subst to reg expression

I want to find out Row which starts with, the user specified details to a script. In general I know what command to be given. awk '$0~/^Vi/' BReject But I need to pass on $1 param of command line at the place of 'Vi'. I tried with -v subst=$1 awk -v subst=$1 '$0~/^subst/' BReject But it... (5 Replies)
Discussion started by: videsh77
5 Replies

2. UNIX for Dummies Questions & Answers

to assign cut values to an array

i need to seperate values seperated by delimiters and assign it to an array.. can u plz help me on that. Variables = "asd,rgbh,(,rty,got,),sroe,9034," i need to assign the variables into arrays.. like.. var=asd var=rgbh.. and so on how do i do this. i need to reuse the values stored in... (6 Replies)
Discussion started by: Syms
6 Replies

3. Shell Programming and Scripting

Iterative statement to cut values from a line

Hi I am new to shell scripting and trying to get values from a text file, I have a text file with values seperated with "|". like aga|120220090525|120220090525|120220090525|120220090530 bab|120220090530|120220090530|120220090535|120220090535|120220090535... (4 Replies)
Discussion started by: mannepalli
4 Replies

4. UNIX for Dummies Questions & Answers

Parse or cut concat variables to individual values

Hello I need to pass some environment parameters to a datastage job and am getting an error when trying to send the complete concatinated variable. I have decided to parse out just the values and send as parameters but am struggling to find the best way to do this (actually I am not very... (3 Replies)
Discussion started by: LynnC
3 Replies

5. Shell Programming and Scripting

Delete character in determinate position with sed/awk

Hello. I'm trying to delete one character in determinate position. Example: qwEtsdf123Ecv34 <delete character in positión 3> Result: qwtsdf123Ecv34 Plase, help me. Thanks (4 Replies)
Discussion started by: maria_florencia
4 Replies

6. Shell Programming and Scripting

CSV with commas in field values, remove duplicates, cut columns

Hi Description of input file I have: ------------------------- 1) CSV with double quotes for string fields. 2) Some string fields have Comma as part of field value. 3) Have Duplicate lines 4) Have 200 columns/fields 5) File size is more than 10GB Description of output file I need:... (4 Replies)
Discussion started by: krishnix
4 Replies

7. UNIX for Dummies Questions & Answers

Cut from tables based on column values

Hello, I have a tab-delimited table that may contain 11,12 or 13 columns. Depending on the number of columns, I want to cut and get a sub table as shown below. However, the awk commands in the code seem to be an issue. What should I be doing differently? #cut columns 1-2,4-5,11 when 12 &... (3 Replies)
Discussion started by: Gussifinknottle
3 Replies

8. Shell Programming and Scripting

A simple variable subst is not working

Hi what i want: listing files in a special range ls -lrt 20120601{05..06}* ... -rw-rw-r-- 1 imp imp 279 1. Jun 07:51 201206010550 -rw-rw-r-- 1 imp imp 279 1. Jun 07:01 201206010600 -rw-rw-r-- 1 imp imp 279 1. Jun 07:11 201206010610 -rw-rw-r-- 1 imp imp 279 1. Jun 07:21... (1 Reply)
Discussion started by: IMPe
1 Replies

9. Shell Programming and Scripting

Using make subst

I have a string of source files ENBL_PX11_LIBSRC = pltsub.f xpltlib.f xbuplot.cI want to replace .f and .c with .o to get ENBL_PX11_LIBOBJ = pltsub.o xpltlib.o xbuplot.o However I am having trouble doing this with subst. (5 Replies)
Discussion started by: kristinu
5 Replies

10. Shell Programming and Scripting

Cut command with dynamic passing of delimiter and position values

Hi All, We have a requirement of picking nth position value by using cut command. value would be delimited by any symbols. We have to pass delimited value and postition to get the value in a string. ex. echo "A,B,C,D,E" |cut -d "," -f3 echo "A|B|C|D|E"|cut -d "|" -f2 Kindly frame the... (5 Replies)
Discussion started by: KK230689
5 Replies
secval(1m)																secval(1m)

NAME
secval - A dcecp object that manages the security validation service on a host SYNOPSIS
secval activate [host_name_list] secval deactivate [host_name_list] secval help [operation | -verbose] secval operations secval ping [host_name_list] secval status [host_name_list] secval update [host_name_list] [-pesite time_in_seconds] ARGUMENTS
A list of one or more names of host systems whose security validation systems you want to act on. If you do not specify this argument, the local host is assumed. The argument is optional and takes one of the following forms: hosts/host_name /.:/hosts/host_name /.../cell_name/hosts/host_name The name can also be a single string binding representing the host with which to communicate. For example: {ncacn_ip_tcp 130.105.1.227} A string binding is useful when the name service is not operating and cannot translate the other forms of host names. The name of the sec- val operation for which to display help information. DESCRIPTION
The secval object represents the security validation service running on a host, as part of the dced server. This service is responsible for maintaining the security credentials of the host machine. Access to the commands is based on the access control list (ACL) of the security validation object for a host. This takes the form of /.../cell_name/hosts/host_name/config/secval. OPERATIONS
secval activate Activates a security validation service. The syntax is as follows: secval activate [host_name_list] The activate operation activates a security validation service. If the service is already activated, an error is returned. The optional host_name_list argument is a list of one or more names of host systems whose security validation systems you want to activate. This opera- tion returns an empty string on success. Privileges Required You must have x (execute) permission to the security validation service object. Examples dcecp> secval activate dcecp> dcecp> secval activate ncacn_ip_tcp:15.22.24.145 dcecp> secval deactivate Deactivates a security validation service. The syntax is as follows: secval deactivate [host_name_list] The deactivate operation deactivates a security validation service. If it is already deactivated, an error is returned. The optional host_name_list argument is a list of one or more names of host systems whose security validation systems you want to deactivate. This operation returns an empty string on success. Privileges Required You must have s (stop) permission to the security validation service object. Examples dcecp> secval deactivate dcecp> dcecp> secval deactivate /.:/hosts/gumby dcecp> secval help Returns help information about the secval object and its operations. The syntax is as follows: secval help [operation | -verbose] Options Displays information about the secval object. Used without an argument or option, the secval help command returns brief information about each secval operation. The optional operation argument is the name of an operation about which you want detailed information. Alternatively, you can use the -verbose option for more detailed information about the secval object itself. Privileges Required No special privileges are needed to use the secval help command. Examples dcecp> secval help activate Enables the secval service. deactivate Disables the secval service. ping Contacts the dced secval to validate the security service. status Returns 1 if secval is enabled, 0 if not. update Updates a component of the secval. help Prints a summary of command-line options. operations Returns a list of the valid operations for this command. dcecp> secval operations Returns a list of the operations supported by the secval object. The syntax is as follows: secval operations The list of available operations is in alphabetical order except for help and operations, which are listed last. Privileges Required No special privileges are needed to use the secval operations command. Examples dcecp> secval operations activate deactivate ping status update help operations dcecp> secval ping Validates the credentials returned by a DCE security service. The syntax is as follows: secval ping [host_name_list] The ping operation validates the credentials returned by a security service. This operation can be used to verify that secd is trusted. The operation returns 1 if the credentials are valid, 0 if they are not. The optional host_name_list argument is a list of one or more names of host systems whose security validation systems you want to validate. If the argument is a list of host names, a list is returned with a 1 or a 0 for each server. Privileges Required No special privileges are needed to use the secval ping command. Examples dcecp> secval ping 1 dcecp> dcecp> secval ping /.../pokey_cell/hosts/gumby 1 dcecp> secval status Checks for an active secval. The syntax is as follows: secval status [host_name_list] The status operation returns 1 if the security validation service is activated, 0 if it is not. If the argument is a list, a list is returned, with a 1 or 0 for each server. Privileges Required No special privileges are needed to use the secval status command. Examples dcecp> secval status 1 dcecp> dcecp> secval status ncacn_ip_tcp:15.22.24.145 1 dcecp> secval update Updates a component of the secval service. The syntax is as follows: secval update [host_name_list] [-pesite time_in_seconds] Options Sets the amount of time to wait between each pe_site Thread Maintenance update. The update operation updates a component of the security validation service. Currently only updates to the pe_site Maintainer Thread are supported. Use the -pesite option to set the amount of time in seconds between each update. The update is performed after the time speci- fied in time_in_seconds passes. If the -pesite option is not supplied, the update is performed immediately. This operation returns an empty string on success. Privileges Required You must have x (execute) permission to the security validation service object. Examples dcecp> secval update -pesite 300 dcecp> RELATED INFORMATION
Commands: dcecp(1m), dced(1m). secval(1m)
All times are GMT -4. The time now is 02:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy