"Escape bash-special character in a bash string"

Post #303031838 by arcoa05 on Wednesday 6th of March 2019 11:21:54 AM

Thanks for your reply, RudiC. The script works fine if the password does not contain the "@". The thing is that we have over 3,000 computers using a password with "@" for the admin account. Also, I would need to make a request to a different department that manages the computer images.. so it wouldn't be that simple to change the password Smilie...

Last edited by arcoa05; 03-06-2019 at 12:29 PM..

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

bash script to check the first character in string

Hello would appreciate if somebody can post a bash script that checks if the first character of the given string is equal to, say, "a" thnx in advance (2 Replies)
Discussion started by: ole111
2 Replies

2. Shell Programming and Scripting

Printing special character in bash

I am using this character as a delimiter '' Currently, I set it straight: DELIMITER='' However, while copying the file, this character often gets mangled. Is there a bash way (perhaps using tr or printf) of generating this character. It corresponds to "chr(0xfe)" if using perl. (I've... (6 Replies)
Discussion started by: sentinel
6 Replies

3. Shell Programming and Scripting

Bash - get specific character from the string

Hi! If I want to extract a character from a specific position of a string, I can use ${string:1:1} (if I want character at the position 1). How can I do the same thing, when the number of position is contained in the variable? ${string:$var:1}doesn't work, unfortunately. Thanks in advance. (2 Replies)
Discussion started by: xqwzts
2 Replies

4. Shell Programming and Scripting

Bash: How to remove the last character of a string?

In bash, how can one remove the last character of a string? In perl, the chop function would remove the last character. However, I do not know how to do the same job in bash. Many thanks in advance. (12 Replies)
Discussion started by: LessNux
12 Replies

5. Shell Programming and Scripting

Regex escape special character in AWK if statement

I am having issues escaping special characters in my AWK script as follows: for id in `cat file` do grep $id in file2 | awk '\ BEGIN {var=""} \ { if ( /stringwith+'|'+'50'chars/ ) { echo "do this" } else if ( /anotherString/ ) { echo "do that" } else { ... (4 Replies)
Discussion started by: purebc
4 Replies

6. Shell Programming and Scripting

Escape special character

Hi, How to use * in call to pl/sql block from shell script? The line "select * from" is causing all files and directiores to show up in email notification but if I give all column names then it works, Please let me know how to use '*' instead of giving all column names, in other wirds how to... (2 Replies)
Discussion started by: sandy162
2 Replies

7. UNIX for Advanced & Expert Users

Escape special character

My input is: jdbc:Oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST= A=(SID= MWDBD22))) In the search pattern, ( and ) and . and @ are special RE, and need to be escaped \( and \) and \. and \@ how can i do it by script or command (9 Replies)
Discussion started by: arindam guha
9 Replies

8. Shell Programming and Scripting

Match string against character class in bash

Hello, I want to check whether string has only numeric characters. The following code doesn't work for me #!/usr/local/bin/bash if ]]; then echo "true" else echo "False" fi # ./yyy '346' False # ./yyy 'aaa' False I'm searching for solution using character classes, not regex.... (5 Replies)
Discussion started by: urello
5 Replies

9. Shell Programming and Scripting

Bash: Pulling first and last character in string

I am writing a bash script that will find all references to the “Well_List” in the “Comp_File”. I am filtering a Well_List that contains the following: TEST_WELL_01 TEST_WELL_02 TEST_WELL_11 TEST_WELL_22 GOV_WELL_1 GOV_WELL_201 PUB_WELL_57 PUB_WELL_82 . . Comparison... (5 Replies)
Discussion started by: petfyp
5 Replies

10. Shell Programming and Scripting

Bash - Inserting non printable character(s) in string variable

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)
Discussion started by: jcdole
6 Replies
gst-complete-0.8(1)						   User Commands					       gst-complete-0.8(1)

gst-complete-0.8, gst-complete - perform bash completion for gst-launch command lines SYNOPSIS
complete -Cgst-complete-0.8 gst-launch gst-complete [--gst-list-mm] [--gst-mm=string] [--print] DESCRIPTION
gst-complete-0.8 enables bash to provide context-sensitive tab completion for gst-launch command lines. See gst-launch(1) for the syntax of gst-launch command lines. You must have a version of bash that supports programmable completion. Such versions of bash provide the complete built-in command. gst-complete is a wrapper script that runs the latest installed version of gst-complete-X.X. For example, if both gst-complete-0.7 and gst- complete-0.8 are installed on your system, gst-complete runs gst-complete-0.8. OPTIONS
The following options are supported by gst-complete-0.8 and gst-complete: --help Display detailed usage message. You can also use -? to specify this option. The following options are supported by gst-complete only: --gst-list-mm List found major/minor versions. This option displays the versions that are available. --gst-mm=string Force major/minor version. This option enables you to specify a specific version to run, if you do not want to run the default version. --print Print wrapped command line. This option displays the command that will be run, and then runs the command. EXAMPLES
Example 1: Generating the Registry of Available Plugins by Running gst-compprep Run the following command in your .bash_profile or other appropriate place: example% complete -C gst-complete-0.8 gst-launch Example 2: Running the Wrapper Script and Displaying the Command Name example% gst-complete --print /usr/bin/gst-complete-0.8 FILES
The following files are used by this application: /usr/bin/gst-complete-0.Executable for bash completion for gst-launch /usr/bin/gst-complete Wrapper script that runs the latest installed version of gst-complete-X.X ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-media | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
gst-compprep(1), gst-feedback(1), gst-inspect(1), gst-launch(1), gst-launch-ext(1), gst-md5sum(1), gst-register(1), gst-thumbnail(1), gst- typefind(1), gst-xmlinspect(1), gst-xmllaunch(1), gstreamer-properties(1), libgstreamer-0.8(3), libgstgetbits(3) NOTES
Original man page written by the GStreamer team at http://gstreamer.net/. Updated by Brian Cameron, Sun Microsystems Inc., 2004. SunOS 5.10 14 Oct 2004 gst-complete-0.8(1)

Featured Tech Videos

All times are GMT -4. The time now is 09:47 AM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy