Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Extract string between two special chracters Post 303012045 by SIMMS7400 on Sunday 28th of January 2018 12:11:46 PM
Old 01-28-2018
Hi Don -

Thank you so much!

That worked like a charm and it's great to know its adaptable across a few different OS's.

Code:
_PBCS_URL=${_PBCS_URL_TST}; STRING=${_PBCS_URL##*-}; _DOMAIN=${STRING%%.*}

RudiC and Aia, both of those options worked great too!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help to extract a string delimited by any special character

I have a string as follows IS*blahblah TED~blahblah etc. I want to list down only IS and TED Can someone help me? (24 Replies)
Discussion started by: kumariak
24 Replies

2. Shell Programming and Scripting

escape chracters

hi, how to echo \\ in unix ie echo the path \\dir1\dir2\\dir3 thanks, Sam (7 Replies)
Discussion started by: sam99
7 Replies

3. Shell Programming and Scripting

Add string after another string with special characters

Hello everyone, I'm writing a script to add a string to an XML file, right after a specified string that only occurs once in the file. For testing purposes I created a file 'testfile' that looks like this: 1 2 3 4 5 6 6 7 8 9 And this is the script as far as I've managed: ... (2 Replies)
Discussion started by: heliode
2 Replies

4. Shell Programming and Scripting

Perl Script Syntax to Extract Everything After Special Character

Hi, I am writing a Perl script that reads in many lines, if a line meets the criteria I want to edit, it. For example, the script will return the following example line... test=abc123 All I want to do is strip off the "test=" and just be left with the abc123. In my script I can easily... (3 Replies)
Discussion started by: edrichard
3 Replies

5. Shell Programming and Scripting

Search for string in a file and extract another string to a variable

Hi, guys. I have one question: I need to search for a string in a file, and then extract another string from the file and assign it to a variable. For example: the contents of the file (group) is below: ... ftp:x:23: mail:x:34 ... testing:x:2001 sales:x:2002 development:x:2003 ...... (6 Replies)
Discussion started by: daikeyang
6 Replies

6. UNIX for Dummies Questions & Answers

tailing a file which contains Control chracters

Hi. I have a log file which gets updated by a java process and it uses ASCII STX and ETX characters (i.e CTRL-B and CTRL-C characters) to demarcate each XML message logged. so the format of the file is something like STX XML_MESSAGE1 .. .. ETX STX XML_MESSAGE2 .. .. ETX each XML... (4 Replies)
Discussion started by: gregoryp
4 Replies

7. Shell Programming and Scripting

to extract string from main string and string comparison

continuing from my previous post, whose link is given below as a reference https://www.unix.com/shell-programming-scripting/171076-shell-scripting.html#post302573569 consider there is create table commands in a file for eg: CREATE TABLE `Blahblahblah` ( `id` int(11) NOT NULL... (2 Replies)
Discussion started by: vivek d r
2 Replies

8. Shell Programming and Scripting

Extract string between 2 special characters

Hi, I have a unix file with contents as below Line1: ABC MNN X$$QWERTY$$ JKL Line2: HELLO $$HOW$$ ARE $$YOU$$ DOING i want to extract the string between $$ and $$ ie i want the output as QWERTY HOW YOU i want those strings seperated by some character say | desired output is... (7 Replies)
Discussion started by: vinredmac
7 Replies

9. Shell Programming and Scripting

Search String and extract few lines under the searched string

Need Assistance in shell programming... I have a huge file which has multiple stations and i wanted to search particular station and extract few lines from it and the rest is not needed Bold letters are the stations . The whole file has multiple stations . Below example i wanted to search... (4 Replies)
Discussion started by: ajayram_arya
4 Replies

10. UNIX for Dummies Questions & Answers

Extract string between two special characters

Hi, I have a file that looks something like >1-18*anc... (12 Replies)
Discussion started by: jyu429
12 Replies
PLYMOUTHD(8)						       System Administration						      PLYMOUTHD(8)

NAME
plymouthd - The plymouth daemon SYNOPSIS
plymouthd [OPTION...] DESCRIPTION
The plymouthd daemon is usually run out of the initrd. It does the heavy lifting of the plymouth system, logging the session and showing the splash screen. The plymouth is used to send commands to plymouthd that control its behaviour. OPTIONS
The following options are understood: --help Show summary of options. --attach-to-session Redirect console messages from screen to log. --no-daemon Do not daemonize. --debug Output debugging information. --debug-file=STRING File to write debugging information to. --mode=MODE Set mode to either boot or shutdown. --pid-file=STRING Write the PID of the daemon to a file. --kernel-command-line=STRING Fake kernel commandline to use. --tty=STRING TTY to ues instead of default. SEE ALSO
grub(8), plymouth(8), plymouth(1), http://www.freedesktop.org/wiki/Software/Plymouth plymouth PLYMOUTHD(8)
All times are GMT -4. The time now is 11:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy