Sponsored Content
Operating Systems Solaris To extract everything between two delimiters Post 302158878 by adderek on Wednesday 16th of January 2008 01:49:26 PM
Old 01-16-2008
Assuming that you have a line in variable X:
X="${X##*/}"
X="${X%.pls}"

To extract lines you can use "while read". Probably "while read -p".
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

extract text b/w two delimiters

I have an input file which looks like " @$SCRIPT/atp_asrmt_adj.sql $SCRIPT/dba2000.scr -s / @$SCRIPT/cim1005w.pls $SCRIPT/dba2000.scr -s / @$SCRIPT/cim1006w.pls start $SCRIPT/cim1020d.sql;^M spool $DATA/cim1021m.sql @$DATA/cim1021m.sql ! rm $DATA/cim1021m.sql spool $DATA/cim1021m.sql... (6 Replies)
Discussion started by: dowsed4u8
6 Replies

2. Shell Programming and Scripting

Problems with delimiters

Hello, I have data in a file something like this - UNB+UNOA:1+006415160:1+AR0000012360:ZZ+080701:0552+2++DELFOR++++T'UNH+2+DELFOR:D:97A:UN Here, the delimiters used are + , : and ' . I have a set of such files in which these delimiters vary from one file to another. I am developing a... (4 Replies)
Discussion started by: The Observer
4 Replies

3. Shell Programming and Scripting

how to extract values b/w two delimiters

Hi, Please help me to extrat values b/w two delimiters. $ echo $abc i want to extract the value 12345 b/w %. (5 Replies)
Discussion started by: tsaravanan
5 Replies

4. Programming

c program to extract text between two delimiters from some text file

needa c program to extract text between two delimiters from some text file. and then storing them in to diffrent variables ? text file like 0: abc.txt ========= aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass... (7 Replies)
Discussion started by: kukretiabhi13
7 Replies

5. Shell Programming and Scripting

sub-string extract between variable delimiters

I need to extract certain pieces from a string, wher delimiters may vary. For example A0 B0 C0 12345677 X0 Y0 Z0 A1-B1 C1 12345678 X1 Y0 Z0 A1/B2 C77 12345679 X2 Y0 Z0 I need to get C0 12345677 X0 C1 12345678 X1 C77 12345679 X2 I tried sed, see example below: echo 'A0 B0... (2 Replies)
Discussion started by: migurus
2 Replies

6. Shell Programming and Scripting

Split using two delimiters

I'm trying to do a split using two delimiters. The first delimiter is ": " (or we could call it :\s). The second is "\n". How can or these delimiters so I can toss the values into an array without issue? I tried @array = split /:\s|\n/, $myvar; This doesn't seem to be working. Any an... (3 Replies)
Discussion started by: mrwatkin
3 Replies

7. Shell Programming and Scripting

Extract strings within XML file between different delimiters

Good afternoon! I have an XML file from which I want to extract only certain elements contained within each line. The problem is that the format of each line is not exactly the same (though similiar). For example, oa_var will be in each line, however, there may be no value or other... (3 Replies)
Discussion started by: bab@faa
3 Replies

8. UNIX for Dummies Questions & Answers

delimiters used in UNIX

Can you point me to information on the different delimited in UNIX like colon, spaces and tabs? (1 Reply)
Discussion started by: momhef4
1 Replies

9. Shell Programming and Scripting

Extract value between the delimiters and replace it with another value

Hi All, i have file name like below ABC_065224_123456_123456_your_130413_163005.txt ABC_065224_123456_MAIN_20130413_163005.txt ABC_065224_123456_123456_MAIN_130413_163005.txt ABC_065224_123456_123456_434567_MAIN_130413_163005.txt i need to find out the number of characters in the filed... (6 Replies)
Discussion started by: dssyadav
6 Replies

10. Shell Programming and Scripting

Skip the delimiter with in double quotes and count the number of delimiters during data extract

Hi All, I'm stuck-up in finding a way to skip the delimiter which come within double quotes using awk or any other better option. can someone please help me out. Below are the details: Delimited: | Sample data: 742433154|"SYN|THESIS MED CHEM PTY.... (2 Replies)
Discussion started by: BrahmaNaiduA
2 Replies
xauth(1X)																 xauth(1X)

NAME
xauth - X authority file utility SYNOPSIS
xauth [-f authfile] [-vqib] [commandarg...] OPTIONS
The following options may be used with xauth. They may be given individually (for example, -q -i) or may combined (for example, -qi). This option specifies the name of the authority file to use. By default, xauth will use the file specified by the XAUTHORITY environment variable or in the user's home directory. This option indicates that xauth should operate quietly and not print unsolicited status mes- sages. This is the default if an xauth command is given on the command line or if the standard output is not directed to a terminal. This option indicates that xauth should operate verbosely and print status messages indicating the results of various operations (for example, how many records have been read in or written out). This is the default if xauth is reading commands from its standard input and its stan- dard output is directed to a terminal. This option indicates that xauth should ignore any authority file locks. Normally, xauth will refuse to read or edit any authority files that have been locked by other programs (usually xdm or another xauth). This option indicates that xauth should attempt to break any authority file locks before proceeding. Use this option only to clean up stale locks. DESCRIPTION
The xauth program is used to edit and display the authorization information used in connecting to the X server. This program is usually used to extract authorization records from one machine and merge them in on another (as is the case when using remote logins or granting access to other users). Commands (described below) may be entered interactively, on the xauth command line, or in scripts. Note that this program does not contact the X server. Normally xauth is not used to create the authority file entry in the first place; xdm does that. COMMANDS
The following commands may be used to manipulate authority files: An authorization entry for the indicated display using the given protocol and key data is added to the authorization file. The data is specified as an even-lengthed string of hexadecimal digits, each pair repre- senting one octet. The first digit of each pair gives the most significant 4 bits of the octet, and the second digit of the pair gives the least significant 4 bits. For example, a 32 character hexkey would represent a 128-bit value. A protocol name consisting of just a single period is treated as an abbreviation for MIT-MAGIC-COOKIE-1. Authorization entries for each of the specified displays are written to the indicated file. If the nextract command is used, the entries are written in a numeric format suitable for non-binary transmission (such as secure electronic mail). The extracted entries can be read back in using the merge and nmerge commands. If the filename consists of just a single dash, the entries will be written to the standard output. Authorization entries for each of the specified displays (or all if no displays are named) are printed on the standard output. If the nlist command is used, entries will be shown in the numeric format used by the nextract command; otherwise, they are shown in a textual format. Key data is always displayed in the hexadecimal format given in the description of the add command. Authorization entries are read from the specified files and are merged into the authorization database, superceding any matching existing entries. If the nmerge command is used, the numeric format given in the description of the extract com- mand is used. If a filename consists of just a single dash, the standard input will be read if it has not been read before. Authorization entries matching the specified displays are removed from the authority file. The specified file is treated as a script containing xauth commands to execute. Blank lines and lines beginning with a sharp sign (#) are ignored. A single dash may be used to indicate the stan- dard input, if it has not already been read. Information describing the authorization file, whether or not any changes have been made, and from where xauth commands are being read is printed on the standard output. If any modifications have been made, the authority file is written out (if allowed), and the program exits. An end of file is treated as an implicit exit command. The program exits, ignoring any modifications. This may also be accomplished by pressing the interrupt character. A description of all commands that begin with the given string (or all commands if no string is given) is printed on the standard output. A short list of the valid commands is printed on the standard output. DISPLAY NAMES
Display names for the add, [n]extract, [n]list, [n]merge, and remove commands use the same format as the DISPLAY environment variable and the common -display command line argument. Display-specific information (such as the screen number) is unnecessary and will be ignored. Same-machine connections (such as local-host sockets, shared memory, and the Internet Protocol hostname localhost) are referred to as host- name/unix:displaynumber so that local entries for different machines may be stored in one authority file. EXAMPLE
The most common use for xauth is to extract the entry for the current display, copy it to another machine, and merge it into the user's authority file on the remote machine: % xauth extract - $DISPLAY | rsh otherhost xauth merge - ENVIRONMENT
This xauth program uses the following environment variables: to get the name of the authority file to use if the -f option is not used. to get the user's home directory if XAUTHORITY is not defined. FILES
default authority file if XAUTHORITY is not defined. BUGS
Users that have unsecure networks should take care to use encrypted file transfer mechanisms to copy authorization entries between machines. Similarly, the MIT-MAGIC-COOKIE-1 protocol is not very useful in unsecure environments. Sites that are interested in additional security may need to use encrypted authorization mechanisms such as Kerberos. Spaces are currently not allowed in the protocol name. Quoting could be added for the truly perverse. AUTHOR
Jim Fulton, MIT X Consortium xauth(1X)
All times are GMT -4. The time now is 05:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy