Escaping backslash and asterisk in egrep to match "\*"
So far what i've got is
No luck.
I've searched the web and not much luck. I know about the escape character
but its confusing to figure out how to use it to match a backslash and use it to escape the asterisk also. Any ides? Thanks!
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi Guys,
we have a shell script which basically query the Database which retrieves huge data and use the data with "egrep" .
Now there is some data which contains characters like "abc)" and the same is used like below :
"egrep (.+\|GDPRAB16\|GDPR/11702 96 abc)\|$ temp.txt"
now while... (7 Replies)
Hi Team,
I am new to this forum and also trying to learn Unix.
I will highly appriciate your help if you can help me to get the right command .
{{{
I use the command " today | egrep '(10:| 11: )' | grep ERROR " to grep all the files that has been error betweeen 10 to 11... (6 Replies)
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 All,
In a Bash Script I'm writing I have a section where I loop through a text file that was
outputted by another script. In the text file some of the strings in there are enclosed with
the BOLD "character sequences" (i.e. "\033But it's weird, because if I run this command:
echo -E... (12 Replies)
Hello friends/'unix experts',
i have a file as below
cat sample.txt
satish
/rakesh/
sandhya
/sandeep/
i have to replace /rakesh/ with rakesh, how can i do it with sed, i tried below code but its throwing errors
sed -e 's/'"\(/rakesh/)\"'/\1rakesh/g' sample.txt
... (1 Reply)
I am executing following command
egrep -w I filename.txt
the filename.txt has following data ....
-I 07-18 08:31:19.924 9880 6 SessionManager ConnectConfig: ConfigurationWebService LoginResults=SuccessfulLogin
I am so hungry that I need to eat
I expect egrep to print only the second... (1 Reply)
Hi, everyone.
I need to write a program to get io info based on libperfstat.
But the "write time" of a disk is just half of the value get from iostat.
I'm confused and can't explain. Help please.
How I calculate "write service time per sec":
In iostat:
write service... (0 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
I need to find two matches in the output from ps. I am searching with ps -ef |grep mysql for:
my.cnf
/bin/sh /usr/bin/mysqld_safe --defaults-file=/data/mysql/master/agis_core/etc/my.cnf
after this match I want to search back and match the hostname which is x number of lines back, above the... (2 Replies)
Discussion started by: bash_in_my_head
2 Replies
LEARN ABOUT HPUX
echo
echo(1) General Commands Manual echo(1)NAME
echo - echo (print) arguments
SYNOPSIS
[arg] ...
DESCRIPTION
writes its arguments separated by blanks and terminated by a new-line on the standard output. It also understands C-like escape conven-
tions; beware of conflicts with the shell's use of
write an alert character
backspace
print line without appending a new-line
form-feed
new-line
carriage return
tab
vertical tab
backslash
the 8-bit character whose
ASCII code is the 1-, 2-, 3- or 4-digit octal number n, whose first character must be a zero.
write an 8-bit value that is the zero-, one-, two- or three-digit octal number
num
is useful for producing diagnostics in command files and for sending known data into a pipe.
Notes
Berkeley differs from this implementation. The former does not implement the backslash escapes. However, the semantics of the escape can
be obtained by using the option. The echo command implemented as a built-in function of follows the Berkeley semantics (see csh(1)).
EXTERNAL INFLUENCES
Environment Variables
determines the interpretation of arg as single and/or multi-byte characters.
If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari-
able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization
variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
AUTHOR
was developed by OSF and HP.
SEE ALSO sh(1).
BUGS
No characters are printed after the first This is not normally a problem.
STANDARDS CONFORMANCE echo(1)