Sponsored Content
Full Discussion: square brackets
Top Forums UNIX for Dummies Questions & Answers square brackets Post 47110 by gilead29 on Tuesday 3rd of February 2004 05:19:45 AM
Old 02-03-2004
square brackets

I would like to substitute a phrase which contains square brackets.


change [JOURNAL] TO [journal]



how?

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

WHy the double square brackets?

One of the senior administrators gave me a shell script to modify and it begins as follows: if ] && ] {more code follows} Why the double square brackets? (10 Replies)
Discussion started by: mojoman
10 Replies

2. Shell Programming and Scripting

Use of double square brackets in ksh

Hi First apologies if this has been raised before. I've got the following in a ksh script: if ] For some reason this does not work. But if I remove the double square brackets to: if This works. I thought ksh supported the ]. Or is there more to it? Thanks in advance. (3 Replies)
Discussion started by: tsu3000
3 Replies

3. Shell Programming and Scripting

Double square brackets question

Hi, I just came across an interesting shell script syntax like the one below: ] && (trap 'rm -rf ${WORK_DIR}/*.$$; echo "\n\nInterrupted !!\n\n"; exit 4' 1 2 3 15) Can someone please explain the code snippet above? The trap command bit is fine but ] && is the hazy part. Generally we use an... (2 Replies)
Discussion started by: King Nothing
2 Replies

4. UNIX for Dummies Questions & Answers

Test command - Two square brackets

Hello, Can someone please explain to me the following line, ] && break I do not understand why two test square brackets are used. Thanks, Shantanu ---------- Post updated at 03:38 PM ---------- Previous update was at 03:35 PM ---------- And, also why there's a $ before (echo $c |... (5 Replies)
Discussion started by: Shan_u2005
5 Replies

5. Shell Programming and Scripting

Replacing text between two square brackets

hi guys, i'm writing a script that looks for a unquie id in a file and replaces a string between two square brackets on the same line as the unquie id: ....... ....... 0001 zz 43242 replace this text] name 0002 sd 65466 UK] country ....... ....... how can i find line with id 0001... (6 Replies)
Discussion started by: zaff
6 Replies

6. Shell Programming and Scripting

Delete text between square brackets and also delete those square brackets using sed or awk

Hi All, I have a text file which looks like this: computer programming systems engineering I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this: computer programming systems engineering I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

7. Shell Programming and Scripting

Compare the value in between square brackets in file

I wanted to compare the value inside the Squre bracket after Colon ( : ) based on any value(seperated by or operator | ) inside the variable Thread and if match found then wnated to store in output file Input file : 20140320 00:08:43.918 INO 35] - Corporate hub is 20140320 00:08:43.918... (2 Replies)
Discussion started by: nes
2 Replies

8. Shell Programming and Scripting

Grep number between Square [] brackets

I wanted to store the number inside the square bracket between colon( : ) and closing suqre bracket(]) in some variable. Suppose I have lines like : Input file : 20140320 00:08:23.846 INFO 84] - anything in line 20140320 00:08:23.846 Test 589] - Virtual and lab lab anything... (18 Replies)
Discussion started by: nes
18 Replies

9. Shell Programming and Scripting

Problem with occurence of square brackets

Hello all, I have the following problem: $ cat infile this is spam and i need this too this is spam and i need this too $ perl -nwe '$_ =~ /]+ \]+)\]\]*\]? (\+)$/; print "$1 - $2\n";' infile i need this - too i need this - and i need this too I am not sure how many occurences of... (13 Replies)
Discussion started by: zaxxon
13 Replies

10. Shell Programming and Scripting

IF statement with square brackets

Hi All, Hope you all are doing good. Yesterday in my project i came across a scenario which i can not guess why it was working in one region and why it was not in another region. Please find my issue below. I am using AIX version 6.0 of UNIX in my project, in shell scripting i have the... (1 Reply)
Discussion started by: mad man
1 Replies
SYSTEMD-JOURNAL-UPLOAD(8)				      systemd-journal-upload					 SYSTEMD-JOURNAL-UPLOAD(8)

NAME
systemd-journal-upload - Send journal messages over the network SYNOPSIS
systemd-journal-upload [OPTIONS...] [-u/--url=URL] [SOURCES...] DESCRIPTION
systemd-journal-upload will upload journal entries to the URL specified with --url. Unless limited by one of the options specified below, all journal entries accessible to the user the program is running as will be uploaded, and then the program will wait and send new entries as they become available. OPTIONS
-u, --url=[https://]URL, --url=[http://]URL Upload to the specified address. URL may specify either just the hostname or both the protocol and hostname. https is the default. --system, --user Limit uploaded entries to entries from system services and the kernel, or to entries from services of current user. This has the same meaning as --system and --user options for journalctl(1). If neither is specified, all accessible entries are uploaded. -m, --merge Upload entries interleaved from all available journals, including other machines. This has the same meaning as --merge option for journalctl(1). -D, --directory=DIR Takes a directory path as argument. Upload entries from the specified journal directory DIR instead of the default runtime and system journal paths. This has the same meaning as --directory option for journalctl(1). --file=GLOB Takes a file glob as an argument. Upload entries from the specified journal files matching GLOB instead of the default runtime and system journal paths. May be specified multiple times, in which case files will be suitably interleaved. This has the same meaning as --file option for journalctl(1). --cursor= Upload entries from the location in the journal specified by the passed cursor. This has the same meaning as --cursor option for journalctl(1). --after-cursor= Upload entries from the location in the journal after the location specified by the this cursor. This has the same meaning as --after-cursor option for journalctl(1). --save-state[=PATH] Upload entries from the location in the journal after the location specified by the cursor saved in file at PATH (/var/lib/systemd/journal-upload/state by default). After an entry is successfully uploaded, update this file with the cursor of that entry. --follow[=BOOL] If set to yes, then systemd-journal-upload waits for input. --key= Takes a path to a SSL key file in PEM format. Defaults to /etc/ssl/private/journal-upload.pem. --cert= Takes a path to a SSL certificate file in PEM format. Defaults to /etc/ssl/certs/journal-upload.pem. --trust= Takes a path to a SSL CA certificate file in PEM format, or all. If all is set, then certificate checking will be disabled. Defaults to /etc/ssl/ca/trusted.pem. -h, --help Print a short help text and exit. --version Print a short version string and exit. EXIT STATUS
On success, 0 is returned; otherwise, a non-zero failure code is returned. EXAMPLES
Example 1. Setting up certificates for authentication Certificates signed by a trusted authority are used to verify that the server to which messages are uploaded is legitimate, and vice versa, that the client is trusted. A suitable set of certificates can be generated with openssl: openssl req -newkey rsa:2048 -days 3650 -x509 -nodes -out ca.pem -keyout ca.key -subj '/CN=Certificate authority/' cat >ca.conf <<EOF [ ca ] default_ca = this [ this ] new_certs_dir = . certificate = ca.pem database = ./index private_key = ca.key serial = ./serial default_days = 3650 default_md = default policy = policy_anything [ policy_anything ] countryName = optional stateOrProvinceName = optional localityName = optional organizationName = optional organizationalUnitName = optional commonName = supplied emailAddress = optional EOF touch index echo 0001 >serial SERVER=server CLIENT=client openssl req -newkey rsa:1024 -nodes -out $SERVER.csr -keyout $SERVER.key -subj "/CN=$SERVER/" openssl ca -batch -config ca.conf -notext -in $SERVER.csr -out $SERVER.pem openssl req -newkey rsa:1024 -nodes -out $CLIENT.csr -keyout $CLIENT.key -subj "/CN=$CLIENT/" openssl ca -batch -config ca.conf -notext -in $CLIENT.csr -out $CLIENT.pem Generated files ca.pem, server.pem, and server.key should be installed on server, and ca.pem, client.pem, and client.key on the client. The location of those files can be specified using TrustedCertificateFile=, ServerCertificateFile=, ServerKeyFile=, in /etc/systemd/journal-remote.conf and /etc/systemd/journal-upload.conf, respectively. The default locations can be queried by using systemd-journal-remote --help and systemd-journal-upload --help. SEE ALSO
systemd-journal-remote(8), journalctl(1), systemd-journald.service(8), systemd-journal-gatewayd.service(8) systemd 237 SYSTEMD-JOURNAL-UPLOAD(8)
All times are GMT -4. The time now is 12:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy