05-06-2019
Looks like $file doesn't exist and never is created, so if's then branch is never executed, flag isn't set to "Y", and the while loop's exit condition is not met.
Proper indentation helps you and others read and understand your code. btw.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
Can anyone tell/guide me how to check remote host is up/running using bash script?
Thanks.
Zulfiqar (5 Replies)
Discussion started by: zulfikarmd
5 Replies
2. Shell Programming and Scripting
I am using KSH and I need to check whether the remote host has been configured with ssh public key. Is there any way we can check inside a script? (6 Replies)
Discussion started by: praveenbvarrier
6 Replies
3. Shell Programming and Scripting
Gurus/Experts
We have a centralized UNIX/Solaris server from where we can actually ssh to all other UNIX/Solaris servers...I need to write a script that reside on this centerlized server and do FileSystem monitoring (basically run df -h or -k) of other remote servers and then send an email to me... (6 Replies)
Discussion started by: anjum.suri
6 Replies
4. UNIX for Advanced & Expert Users
I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1.
When I do a who -m from A2, I see the "connected from" as "A1".
=> who -m
userid pts/2 2010-03-27 08:47 (A1)
I want to identify who is the local host who initiated the connection to... (3 Replies)
Discussion started by: gomes1333
3 Replies
5. Shell Programming and Scripting
Hi,
My script needs to check whether the remote host is up or not.
If it is up i need to start few servers in that host or else just a notification should be sent that the remote host is down?
Could someone help me out in this?
Regards
Arun (4 Replies)
Discussion started by: arunkumarmc
4 Replies
6. Shell Programming and Scripting
Hi all,
I am a beginner to shell script.Can any one please help me on the below requirement
I need to check whether the file (called 3Com_Files_Delivered.txt) exists on the remote mechaine or not? if so i need to copy all the files from there to my local mechaine.Especially i am... (7 Replies)
Discussion started by: narasimha123
7 Replies
7. Shell Programming and Scripting
flamingo:~ jnojr$ ssh -t macbook sudo -v
Password:
Connection to macbook closed.
flamingo:~ jnojr$ ssh -t macbook sudo cat /etc/cma.conf | grep CMABuildNumber
<CMABuildNumber>2918</CMABuildNumber>
Connection to macbook closed.
flamingo:~ jnojr$ ssh -t macbook sudo -k
Connection to macbook... (3 Replies)
Discussion started by: jnojr
3 Replies
8. UNIX for Dummies Questions & Answers
I am able to connect to a remote host using the legacy IP and port 2222.
Today the remote has a new IP I am unable to connect.
How to check if the remote host is blocking or if its my server is unable to connect.
Err Msg : telnet: Unable to connect to remote host: Connection refused
Err... (5 Replies)
Discussion started by: ITDev01
5 Replies
9. Shell Programming and Scripting
Hi,
Given addresses of 2 remote machines, using a shell script is it possible to
get the state of running processes in "src"
stop all the processes in "src"
exit out of "src"
ssh into "dest"
resume the state of executing processes captured in step 1 in "dest"
Assumption:
"src" is... (3 Replies)
Discussion started by: Saeya Darsan
3 Replies
10. Shell Programming and Scripting
Geeks,
Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s).
Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies
LEARN ABOUT DEBIAN
stg-branch
STG-BRANCH(1) StGit Manual STG-BRANCH(1)
NAME
stg-branch - Branch operations: switch, list, create, rename, delete, ...
SYNOPSIS
stg branch
stg branch <branch>
stg branch --list
stg branch --create <new-branch> [<committish>]
stg branch --clone [<new-branch>]
stg branch --rename <old-name> <new-name>
stg branch --protect [<branch>]
stg branch --unprotect [<branch>]
stg branch --delete [--force] <branch>
stg branch --description=<description> [<branch>]
DESCRIPTION
Create, clone, switch between, rename, or delete development branches within a git repository.
stg branch
Display the name of the current branch.
stg branch <branch>
Switch to the given branch.
OPTIONS
-l, --list
List each branch in the current repository, followed by its branch description (if any). The current branch is prefixed with >.
Branches that have been initialized for StGit (with linkstg:init[]) are prefixed with s. Protected branches are prefixed with p.
-c, --create
Create (and switch to) a new branch. The new branch is already initialized as an StGit patch stack, so you do not have to run
linkstg:init[] manually. If you give a committish argument, the new branch is based there; otherwise, it is based at the current HEAD.
StGit will try to detect the branch off of which the new branch is forked, as well as the remote repository from which that parent
branch is taken (if any), so that running linkstg:pull[] will automatically pull new commits from the correct branch. It will warn if
it cannot guess the parent branch (e.g. if you do not specify a branch name as committish).
--clone
Clone the current branch, under the name <new-branch> if specified, or using the current branch's name plus a timestamp.
The description of the new branch is set to tell it is a clone of the current branch. The parent information of the new branch is
copied from the current branch.
-r, --rename
Rename an existing branch.
-p, --protect
Prevent StGit from modifying a branch -- either the current one, or one named on the command line.
-u, --unprotect
Allow StGit to modify a branch -- either the current one, or one named on the command line. This undoes the effect of an earlier stg
branch --protect command.
--delete
Delete the named branch. If there are any patches left in the branch, StGit will refuse to delete it unless you give the --force flag.
A protected branch cannot be deleted; it must be unprotected first (see --unprotect above).
If you delete the current branch, you are switched to the "master" branch, if it exists.
-d DESCRIPTION, --description DESCRIPTION
Set the branch description.
--force
Force a delete when the series is not empty.
STGIT
Part of the StGit suite - see linkman:stg[1]
StGit 03/13/2012 STG-BRANCH(1)