Sponsored Content
Top Forums Shell Programming and Scripting Trying to make a resync script Post 303004641 by Scrutinizer on Thursday 5th of October 2017 02:41:52 PM
Old 10-05-2017
Quote:
Originally Posted by Stellaman1977
Thanks- I'm using Solaris 9 which doesn't seem to recognize exit code option
Code:
-q

. [..]
Yes it does. You need to use /usr/xpg4/bin/grep for that..
This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

make script

I need to write a make script to install a C module in a UNIX environment.It should install the sources, build the libraries and install them and also install the info pages on the system. Can this script be general enough to also install on windows, windows dll, windows help file's etc. Any... (3 Replies)
Discussion started by: cherio
3 Replies

2. Shell Programming and Scripting

Help make script much easier

Is there any method to realise this in one command? Thanks in advance (2 Replies)
Discussion started by: GCTEII
2 Replies

3. UNIX for Dummies Questions & Answers

raidctl and resync when reboot

I am using raidctl on a v440 disk and noticed it resyncs after every boot, which takes about 30 minutes because of the size of the partition. I am concerned with what happens during the resync if "writes" happen to the disk before it is complete? Any info would be helpful. Thanks (0 Replies)
Discussion started by: csgonan
0 Replies

4. Linux

HELP PLEASE about Resync and sync interval in linux

Can anyone could tell me what is the meaning of this problem: Last successful check resync is greater than min sync interval (1195785433 > 7200) And what can do to solve this problem. Thank you..Please HElp me! (4 Replies)
Discussion started by: o_m_g
4 Replies

5. AIX

How long does AIX resync the time with another server

Hi, I have NTP configured: vi /etc/ntp.conf broadcastclient server 128.127.1.3 driftfile /etc/ntp.drift tracefile /etc/ntp.trace # xntpdc xntpdc> sysinfo system peer: 128.127.1.3 system peer mode: client leap indicator: 00 stratum: 12 precision: ... (0 Replies)
Discussion started by: victorcheung
0 Replies

6. Shell Programming and Scripting

trailing slash - resync command

Hi All, i am aware that there is a difference between: 1. rsync -n -av /tmp . 2. rsync -n -av /tmp/ . I would like to do the first option. But if i use a variable (rsync -av $log .), the command behaves like a second option (with the trailing slash) Is there any way to use a... (2 Replies)
Discussion started by: c00kie88
2 Replies

7. Shell Programming and Scripting

how to run script? call other script? su to another user? make a cron?

Good morning. I am searching for "how-to"'s for some particular questions: 1. How to write a script in HP-UX 11. 2. How to schedule a script. 3. How to "call" scripts from the original script. 4. How to su to another user from within a script. This is the basics of what the... (15 Replies)
Discussion started by: instant000
15 Replies

8. AIX

Resync data on File system

Hi All, I have two mount points have the same data with little changes between them /appabc1 /appabc2 Both of them have the same data, there is some little changes on the data between them I want /appabc2 to has the same data of /appabc1 exactly including to those little changes... (6 Replies)
Discussion started by: Mr.AIX
6 Replies

9. UNIX for Dummies Questions & Answers

Can I reboot during a metadevice resync?

In my infinite lack of wisdom, I brought a Solaris 10(Sparc, 64 bit ) system down to init 1, detached a metadrive so that I could run format->analyze->refresh on it, and then reinit'd and reattached it . It started syncing the drive as it's a submirror of a mirrored drive, which happens... (8 Replies)
Discussion started by: the.gooch
8 Replies

10. Solaris

Reboot causes disks in Resync State

Dear Team, This time i am facing some new problems which is beyond my thinking. I need some expert advice. We are having 4 Servers ( 2 nos Sun SPARC Enterprise T5220 & 2 nos of SF e2900 Servers ). Both the T5220 Servers are Termed as Node A and Node B . The same things are followed with... (1 Reply)
Discussion started by: sudhansu
1 Replies
SHELL-QUOTE(1p) 					User Contributed Perl Documentation					   SHELL-QUOTE(1p)

NAME
shell-quote - quote arguments for safe use, unmodified in a shell command SYNOPSIS
shell-quote [switch]... arg... DESCRIPTION
shell-quote lets you pass arbitrary strings through the shell so that they won't be changed by the shell. This lets you process commands or files with embedded white space or shell globbing characters safely. Here are a few examples. EXAMPLES
ssh preserving args When running a remote command with ssh, ssh doesn't preserve the separate arguments it receives. It just joins them with spaces and passes them to "$SHELL -c". This doesn't work as intended: ssh host touch 'hi there' # fails It creates 2 files, hi and there. Instead, do this: cmd=`shell-quote touch 'hi there'` ssh host "$cmd" This gives you just 1 file, hi there. process find output It's not ordinarily possible to process an arbitrary list of files output by find with a shell script. Anything you put in $IFS to split up the output could legitimately be in a file's name. Here's how you can do it using shell-quote: eval set -- `find -type f -print0 | xargs -0 shell-quote --` debug shell scripts shell-quote is better than echo for debugging shell scripts. debug() { [ -z "$debug" ] || shell-quote "debug:" "$@" } With echo you can't tell the difference between "debug 'foo bar'" and "debug foo bar", but with shell-quote you can. save a command for later shell-quote can be used to build up a shell command to run later. Say you want the user to be able to give you switches for a command you're going to run. If you don't want the switches to be re-evaluated by the shell (which is usually a good idea, else there are things the user can't pass through), you can do something like this: user_switches= while [ $# != 0 ] do case x$1 in x--pass-through) [ $# -gt 1 ] || die "need an argument for $1" user_switches="$user_switches "`shell-quote -- "$2"` shift;; # process other switches esac shift done # later eval "shell-quote some-command $user_switches my args" OPTIONS
--debug Turn debugging on. --help Show the usage message and die. --version Show the version number and exit. AVAILABILITY
The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ or CPAN for updated versions. AUTHOR
Roderick Schertler <roderick@argon.org> perl v5.8.4 2005-05-03 SHELL-QUOTE(1p)
All times are GMT -4. The time now is 11:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy