Is this a valid use of the -e option of mklv?:
You should also test for the success of mklv before proceeding to the next (crfs) command. That would save on unnecessary output and more errors.
Not sure what this read statement is doing here:
Perhaps you should remove that?
I presume you're trying to increment NUM here?:
Try:
But I guess you want to go from 1 up to NUM?
I won't to remove a filesystem /dev/vg01/lvo1 and copy the same to different vg ex:- /dev/vg02.
Pls give the required step to be followed to complete the said process (3 Replies)
1.Daily there will be 14 files in the data directory
2.someday's the 14 files receive more than once r twice with different time stamps....we need to chk the count of the file and if the count of the file is two.we need to combine the both the files.
3. if any duplicate data is there just... (1 Reply)
I have av script that loops through some statistic files to create a report. We would like to only loop through non-empty files as these files create an empty report-line.
I have figured out how to find the non-empty files, but not how to loop through only those files.
Here is the code that finds... (4 Replies)
I'd seek for help on how to create a bunch of printers in AIX 6.x or equal or above in one go – say like I have 35 printers to create in 4 different AIX Nodes every month – I currently create it manually like below:-
How can I automatic this creation on all the 4-5 Nodes – not actually automatic... (3 Replies)
Hi,
I'm trying to write a for loop to run through a list of servers and for each server copy a file to a backup file. But I can't seem to get it to run through my server list. It work for individual servers, please see below.
#!/bin/ksh
SSH_USERID=khcuser
webservers="server1 server2"
... (2 Replies)
Hi all
I want to know if suppose my global zone has UFS root file system & now I want to create non global zone with ZFS root file system. Is it possible.....If this is possible then how will I able to create zone based on ZFS root file system in global zone having UFS based root file system (5 Replies)
Hi All,
I am trying to create a CSV file within a shell script test.ksh and the code snippet is something like below:
#!/usr/bin/ksh
# Set required variables.
. $HOME/.prof
# Output file path
Group1=/tmp/G1.csv
Group2=/tmp/G2.csv
Group3=/tmp/G3.csv
$ORACLE_HOME/bin/sqlplus -s... (2 Replies)
Hey guys,
I'm attempting to migrate us to a new box. First problem I had was the change in architecture going from sun4u to sun4v, we have a Sun M5000 and are moving to a Fujitsu M10-4. I figured out how to make the flash archive work between architectures.
Now I appear to be running into an... (2 Replies)
I'm working on Aix 6.1 and using ksh shell.
The below works fine on Linux bash or ksh shell .
while IFS= read -r dirpath ; do
echo "Hi"
done <<<"$var"
However, any such while loop that reads the input from file or variable using <<< fails on Aix system with the below error:
Below... (2 Replies)
Discussion started by: mohtashims
2 Replies
LEARN ABOUT REDHAT
escape
escape(1) Mail Avenger 0.8.3 escape(1)NAME
escape - escape shell special characters in a string
SYNOPSIS
escape string
DESCRIPTION
escape prepends a "" character to all shell special characters in string, making it safe to compose a shell command with the result.
EXAMPLES
The following is a contrived example showing how one can unintentionally end up executing the contents of a string:
$ var='; echo gotcha!'
$ eval echo hi $var
hi
gotcha!
$
Using escape, one can avoid executing the contents of $var:
$ eval echo hi `escape "$var"`
hi ; echo gotcha!
$
A less contrived example is passing arguments to Mail Avenger bodytest commands containing possibly unsafe environment variables. For
example, you might write a hypothetical reject_bcc script to reject mail not explicitly addressed to the recipient:
#!/bin/sh
formail -x to -x cc -x resent-to -x resent-cc
| fgrep "$1" > /dev/null
&& exit 0
echo "<$1>.. address does not accept blind carbon copies"
exit 100
To invoke this script, passing it the recipient address as an argument, you would need to put the following in your Mail Avenger rcpt
script:
bodytest reject_bcc `escape "$RECIPIENT"`
SEE ALSO avenger(1),
The Mail Avenger home page: <http://www.mailavenger.org/>.
BUGS
escape is designed for the Bourne shell, which is what Mail Avenger scripts use. escape might or might not work with other shells.
AUTHOR
David Mazieres
Mail Avenger 0.8.3 2012-04-05 escape(1)