[grep] how to grep a sentence which has quotation marks "sentence"
I would like to check with grep in this configuration file:
{
"alt-speed-down": 200,
"alt-speed-enabled": true,
"alt-speed-time-begin": 1140,
"alt-speed-time-day": 127,
"...something..." : true,
...
}
"alt-speed-enabled" (the third line of the file) is setted to true. I have tried this:
it does not work because of the "" . Could anybody helpme, please?
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,
I don't know hot to make this command work:
ls -laR | grep "^-" | awk '{print $9}'| grep "$.txt"
It should return the list of file .txt
It's important to search .txt at the end of the line, becouse some file name have "txt" in their name but have other extensions (13 Replies)
Hi Guys,
I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys.
MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' `
Harby. (4 Replies)
AIX 4.2
I am trying to do an rsh grep to search for date records inside server logs by doing this :
xx=`date +"%a %b %d"`
rsh xxx grep "^$XX" zzz
gives :
grep: 0652-033 Cannot open Jun.
grep: 0652-033 Cannot open 11.
But if I do :
xx=`date +"%a %b %d"`
grep "^$XX" zzz
it works... (2 Replies)
Hi People,
I need some Help to write a unix script that asks for a sentence to be typed out then with the sentence. Counts the number of spaces within the sentence and then echo's out "The Number Of Spaces In The Sentence is 4" as a example
Thanks
Danielle (12 Replies)
Hi all,
can any one suggest me the script to grep multiple strings from ps -ef
pls correct the below script . its not working/
i want to print OK if all the below process are running in my solaris system. else i want to print NOT OK.
bash-3.00$ ps -ef | grep blu
lscpusr 48 42 ... (11 Replies)
I want to list all files/lines which except those which contain the pattern ' /proc/' OR ' /sys/' (mind the leading blank).
In a first approach I coded:
find / -exec ls -ld {} | grep -v ' /proc/| /sys/' \; > /tmp/list.txt
But this doesn't work. I got an error (under Ubuntu):
grep:... (5 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)
Hi everybody,
I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o
My code:
#!/bin/sh
set -e
set -u
export IFS=
optl="Optl"
LOCSTORCLI="/opt/lsi/storcli/storcli"
($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies
LEARN ABOUT HPUX
cfgetispeed
cfspeed(3C)cfspeed(3C)NAME
cfgetospeed(), cfsetospeed(), cfgetispeed(), cfsetispeed() - tty baud rate functions
SYNOPSIS DESCRIPTION
These functions set and get the input and output speed codes in the termios structure referenced by termios_p. The termios structure con-
tains these speed codes representing input and output baud rates as well as other terminal related parameters. Setting the parameters on a
terminal file does not become effective until is successfully called.
returns the output speed code from the
termios structure referenced by termios_p.
sets the output speed code in the
termios structure referenced by termios_p to speed. The speed code for a baud rate of zero, is used to termi-
nate the connection. If is specified, the modem control lines are no longer asserted, which normally discon-
nects the line.
returns the input speed code from the
termios structure referenced by termios_p.
sets the input speed code in the
termios structure referenced by termios_p to speed.
RETURN VALUE
returns the output speed code from the termios structure referenced by termios_p.
returns the input speed code from the termios structure referenced by termios_p.
and return zero upon successful completion. Otherwise, they return -1 and set to indicate the error.
ERRORS
and fail when the following condition is encountered:
[EINVAL] The value of speed is outside the range of possible speed codes as specified in
WARNINGS
and can be used to set speed codes in the termios structure that are not supported by the terminal hardware.
SEE ALSO tcattribute(3C), thread_safety(5), termio(7).
STANDARDS CONFORMANCE cfspeed(3C)