You didn't mention what operating system you're using (which always helps when you ask for help in this forum), but if you your version of grep includes a -A option (which is not required by the standards), an easy way to do what you seem to want would be:
An alternative would be:
As always, if you want to try the awk command on a Solaris/SunOS system, change awk to /usr/xpg4/bin/awk or nawk.
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here.
I have following script (called out_to_streams.csh):
#!/bin/tcsh -f
echo Redirected to STDOUT > /dev/stdout
echo Redirected to... (2 Replies)
Hello.
Following recommendations for one of my threads, this is working perfectly :
#!/bin/bash
CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" )
Now I need a grep success for some thing like :
#!/bin/bash
CNT=$( grep -c -e "some text_1... (4 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hi,
I am using awk here.
Inside an awk script, I have a variable which contains a very long XML data in string format (500kb).
I want to pass this data (as argument) to curl command using system function.
But getting Too many arguments error due to length of string data(payloadBlock).
I... (4 Replies)
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
LEARN ABOUT DEBIAN
globus_url_t
globus_url_t(3) globus common globus_url_t(3)NAME
globus_url_t -
SYNOPSIS
Data Fields
char * scheme
globus_url_scheme_t scheme_type
char * user
char * password
char * host
unsigned short port
char * url_path
char * dn
char * attributes
char * scope
char * filter
char * url_specific_part
Detailed Description
Parsed URLs.
This structure contains the fields which were parsed from an string representation of an URL. There are no methods to access fields of this
structure.
Field Documentation
char* globus_url_t::scheme
A string containing the URL's scheme (http, ftp, etc)
globus_url_scheme_t globus_url_t::scheme_type
An enumerated scheme type. This is derived from the scheme string
char* globus_url_t::user
The username portion of the URL. [ftp, gsiftp]
char* globus_url_t::password
The user's password from the URL. [ftp, gsiftp]
char* globus_url_t::host
The host name or IP address of the URL. [ftp, gsiftp, http, https, ldap, x-nexus
unsigned short globus_url_t::port
The TCP port number of the service providing the URL [ftp, gsiftp, http, https, ldap, x-nexus].
char* globus_url_t::url_path
The path name of the resource on the service providing the URL. [ftp, gsiftp, http, https]
char* globus_url_t::dn
The distinguished name for the base of an LDAP search. [ldap]
char* globus_url_t::attributes
The list of attributes which should be returned from an LDAP search. [ldap]
char* globus_url_t::scope
The scope of an LDAP search. [ldap]
char* globus_url_t::filter
The filter to be applied to an LDAP search [ldap].
char* globus_url_t::url_specific_part
An unparsed string containing the remaining text after the optional host and port of an unknown URL, or the contents of a x-gass-cache URL
[x-gass-cache, unknown].
Author
Generated automatically by Doxygen for globus common from the source code.
Version 14.7 Tue Nov 27 2012 globus_url_t(3)