Search Results

Search: Posts Made By: Pandee
Forum: AIX 08-05-2014
2,677
Posted By blackrageous
or.. dig +short -x <ip-address>
or..

dig +short -x <ip-address>
Forum: AIX 08-05-2014
2,677
Posted By rbatte1
If the printer is directly network attached...
If the printer is directly network attached (Xerox, Ricoh, HP, .......) you may need the software or script from the supplier to drive them. If the printer is attached to another server, then your...
2,349
Posted By alister
If exec can't find the interpreter, none of the...
If exec can't find the interpreter, none of the script executes, including set -x.

It's almost certainly a carriage return at the end of the interpreter line. Not only would it explain why the...
1,834
Posted By alister
That's massively inefficient. There's no need to...
That's massively inefficient. There's no need to invoke grep once per line.

If the lines in fileA.log are not regular expressions, use fixed string matching.

The first cat command it's...
2,349
Posted By in2nix4life
Try adding set -x to the top of your script below...
Try adding set -x to the top of your script below the #!/bin/sh line, run it again, and provide the output.


#!/bin/sh
set -x
2,349
Posted By alister
Looks like a carriage return at the end of the...
Looks like a carriage return at the end of the shebang (probably a result of editing in Windows).

Regards,
Alister
2,349
Posted By in2nix4life
Show what you're running that produces that error.
Show what you're running that produces that error.
2,349
Posted By in2nix4life
If you're using GNU Sed sed --version |...
If you're using GNU Sed


sed --version | grep GNU


this should take care of all three in the file:


sed -r '/^$|-|PRCSINSTANCE/d' file
2,349
Posted By in2nix4life
That seems straightforward enough, however, you...
That seems straightforward enough, however, you list three different files (see below). Please explain further.


Sfile=/u01/scripts/Sfile.log
Pfile=/u01/scripts/Pfile.log...
2,349
Posted By pravin27
Sfile=/path/filename sed -i.BKUP '/^$/d' $Sfile...
Sfile=/path/filename
sed -i.BKUP '/^$/d' $Sfile
-i option is in place replacement, sed will take backup of your original file as "filename.BKUP"
2,349
Posted By in2nix4life
echo $Sfile | sed -i.BKUP '/^$/d'
echo $Sfile | sed -i.BKUP '/^$/d'
1,834
Posted By Chubler_XL
Should like cjahdskjah aaaaSTUFF xyz be deleted...
Should like cjahdskjah aaaaSTUFF xyz be deleted from fileB.log in your example?

If not modify Yoda's solution as follows:

grep -vwf fileA.log fileB.log
1,834
Posted By disedorgue
Hi, You must use $line versus $FileA in your...
Hi,
You must use $line versus $FileA in your line sed:
sed -i "/\b$line\b/d" $File_B

But, your solution read/write file2 as far as number line from file1

Better solution:
$ printf...
1,834
Posted By Yoda
grep -vf fileA.log fileB.log
grep -vf fileA.log fileB.log
2,409
Posted By Corona688
Also, that case expression does an exact match. ...
Also, that case expression does an exact match. If you want a substring match:

*ABCD*|*ASDF*|*WEDF*|*YUIO*)
2,409
Posted By vbe
You havent respected the strict syntax of case......
You havent respected the strict syntax of case...


case "$var1" in
ABCD|ASDF|WEDF|YUIO) echo The queue is $var1
;;
*) echo "No match"
;;...
2,409
Posted By rbatte1
Please use [CODE] tags, not [ICODE] tags. ...
Please use [CODE] tags, not [ICODE] tags.

Anyway, can you have a newline after the in keyword and the expression and see if that helps. Look at the example given for the neat way to write code...
2,409
Posted By Corona688
That is not how case works, reread the example...
That is not how case works, reread the example shown to you.

case "$var1" in
val1|val2|val3) echo $var1 found ;;
esac Variable is in red, expression is in green.

The newlines, ), and ;;...
2,409
Posted By anbu23
$ var1="a" $ if echo 'val1 val2 val3' | grep...
$ var1="a"
$ if echo 'val1 val2 val3' | grep -wq "$var1" ; then
> echo Match found
> fi
$
2,409
Posted By rbatte1
I would go with Subbeh's second option, the case...
I would go with Subbeh's second option, the case statement.

There are two reasons for this, because the echo....grep ...:-

creates extra processes, so in a loop, this could be costly to the...
2,409
Posted By Subbeh
Either use grep: if echo 'val1 val2 val3' |...
Either use grep:
if echo 'val1 val2 val3' | grep -q "$var1" ; then
echo $var1 found
fi
or case:
case "$var1" in
val1|val2|val3) echo $var1 found ;;
esac
5,992
Posted By Scott
Hello! Your question(s) could easily be...
Hello!

Your question(s) could easily be answered by searching the Internet with Google (http://www.google.com). Google is your friend :D

Per forum rules,...
Forum: Solaris 11-06-2012
11,036
Posted By Yoda
If your requirement is to change the owner of...
If your requirement is to change the owner of directory & files within it, then try below command after transferring:-
ssh $user@$host "chown -R user <absolute path of dir>"

where user is user to...
Showing results 1 to 23 of 23

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