Search Results

Search found 6493 results on 260 pages for 'git bash'.

Page 3/260 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Tracking upstream svn changes with git-svn and github?

    - by Joseph Turian
    How do I track upstream SVN changes using git-svn and github? I used git-svn to convert an SVN repo to git on github: $ git svn clone -s http://svn.osqa.net/svnroot/osqa/ osqa $ cd osqa $ git remote add origin [email protected]:turian/osqa.git $ git push origin master I then made a few changes in my git repo, committed, and pushed to github. Now, I am on a new machine. I want to take upstream SVN changes, merge them with my github repo, and push them to my github repo. This documentation says: "If you ever lose your local copy, just run the import again with the same settings, and you’ll get another working directory with all the necessary SVN metainfo." So I did the following. But none of the commands work as desired. How do I track upstream SVN changes using git-svn and github? What am I doing wrong? $ git svn clone -s http://svn.osqa.net/svnroot/osqa/ osqa $ cd osqa $ git remote add origin [email protected]:turian/osqa.git $ git push origin master To [email protected]:turian/osqa.git ! [rejected] master -> master (non-fast forward) error: failed to push some refs to '[email protected]:turian/osqa.git' $ git pull remote: Counting objects: 21, done. remote: Compressing objects: 100% (17/17), done. remote: Total 17 (delta 7), reused 9 (delta 0) Unpacking objects: 100% (17/17), done. From [email protected]:turian/osqa * [new branch] master -> origin/master From [email protected]:turian/osqa * [new tag] master -> master You asked me to pull without telling me which branch you want to merge with, and 'branch.master.merge' in your configuration file does not tell me either. Please name which branch you want to merge on the command line and try again (e.g. 'git pull <repository> <refspec>'). See git-pull(1) for details on the refspec. ... $ /usr//lib/git-core/git-svn rebase warning: refname 'master' is ambiguous. First, rewinding head to replay your work on top of it... Applying: Added forum/management/commands/dumpsettings.py error: Ref refs/heads/master is at 6acd747f95aef6d9bce37f86798a32c14e04b82e but expected a7109d94d813b20c230a029ecd67801e6067a452 fatal: Cannot lock the ref 'refs/heads/master'. Could not move back to refs/heads/master rebase refs/remotes/trunk: command returned error: 1

    Read the article

  • How to debug a .bash_profile

    - by Blankman
    I was updating my .bash_profile, and unfortunetly I made a few updates and now I am getting: env: bash: No such file or directory env: bash: No such file or directory env: bash: No such file or directory env: bash: No such file or directory env: bash: No such file or directory -bash: tar: command not found -bash: grep: command not found -bash: cat: command not found -bash: find: command not found -bash: dirname: command not found -bash: /preexec.sh.lib: No such file or directory -bash: preexec_install: command not found -bash: sed: command not found -bash: git: command not found My bash_profile actually pulls in other .sh files (sources them) so I am not exactly sure which modification may have caused this. Now if I even try and to a list of files, I get: >ls -bash: ls: command not found -bash: sed: command not found -bash: git: command not found Any tips on how to trace the source of the error, and how to be able to use the terminal for basic things like listing files etc?

    Read the article

  • Every command fails with "command not found" after changing .bash_profile?

    - by Blankman
    I was updating my .bash_profile, and unfortunetly I made a few updates and now I am getting: env: bash: No such file or directory env: bash: No such file or directory env: bash: No such file or directory env: bash: No such file or directory env: bash: No such file or directory -bash: tar: command not found -bash: grep: command not found -bash: cat: command not found -bash: find: command not found -bash: dirname: command not found -bash: /preexec.sh.lib: No such file or directory -bash: preexec_install: command not found -bash: sed: command not found -bash: git: command not found My bash_profile actually pulls in other .sh files (sources them) so I am not exactly sure which modification may have caused this. Now if I even try and to a list of files, I get: >ls -bash: ls: command not found -bash: sed: command not found -bash: git: command not found Any tips on how to trace the source of the error, and how to be able to use the terminal for basic things like listing files etc?

    Read the article

  • Git: Create a branch from unstagged/uncommited changes on master

    - by knoopx
    Context: I'm working on master adding a simple feature. After a few minutes I realize it was not so simple and it should have been better to work into a new branch. This always happens to me and I have no idea how to switch to another branch and take all these uncommited changes with me leaving the master branch clean. I supposed git stash && git stash branch new_branch would simply accomplish that but this is what I get: ~/test $ git status # On branch master nothing to commit (working directory clean) ~/test $ echo "hello!" > testing ~/test $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: testing # no changes added to commit (use "git add" and/or "git commit -a") ~/test $ git stash Saved working directory and index state WIP on master: 4402b8c testing HEAD is now at 4402b8c testing ~/test $ git status # On branch master nothing to commit (working directory clean) ~/test $ git stash branch new_branch Switched to a new branch 'new_branch' # On branch new_branch # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: testing # no changes added to commit (use "git add" and/or "git commit -a") Dropped refs/stash@{0} (db1b9a3391a82d86c9fdd26dab095ba9b820e35b) ~/test $ git s # On branch new_branch # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: testing # no changes added to commit (use "git add" and/or "git commit -a") ~/test $ git checkout master M testing Switched to branch 'master' ~/test $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: testing # no changes added to commit (use "git add" and/or "git commit -a") Do you know if there is any way of accomplishing this?

    Read the article

  • Setup git repository on gentoo server using gitosis & ssh

    - by ikso
    I installed git and gitosis as described here in this guide Here are the steps I took: Server: Gentoo Client: MAC OS X 1) git install emerge dev-util/git 2) gitosis install cd ~/src git clone git://eagain.net/gitosis.git cd gitosis python setup.py install 3) added git user adduser --system --shell /bin/sh --comment 'git version control' --no-user-group --home-dir /home/git git In /etc/shadow now: git:!:14665:::::: 4) On local computer (Mac OS X) (local login is ipx, server login is expert) ssh-keygen -t dsa got 2 files: ~/.ssh/id_dsa.pub ~/.ssh/id_dsa 5) Copied id_dsa.pub onto server ~/.ssh/id_dsa.pub Added content from file ~/.ssh/id_dsa.pub into file ~/.ssh/authorized_keys cp ~/.ssh/id_dsa.pub /tmp/id_dsa.pub sudo -H -u git gitosis-init < /tmp/id_rsa.pub sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update 6) Added 2 params to /etc/ssh/sshd_config RSAAuthentication yes PubkeyAuthentication yes Full sshd_config: Protocol 2 RSAAuthentication yes PubkeyAuthentication yes PasswordAuthentication no UsePAM yes PrintMotd no PrintLastLog no Subsystem sftp /usr/lib64/misc/sftp-server 7) Local settings in file ~/.ssh/config: Host myserver.com.ua User expert Port 22 IdentityFile ~/.ssh/id_dsa 8) Tested: ssh [email protected] Done! 9) Next step. There I have problem git clone [email protected]:gitosis-admin.git cd gitosis-admin SSH asked password for user git. Why ssh should allow me to login as user git? The git user doesn't have a password. The ssh key I created is for the user expert. How this should work? Do I have to add some params to sshd_config?

    Read the article

  • Git repository gets corrupted when I do a large commit: "Possible repository corruption on the remot

    - by mindthief
    Hi All, A friend of mine and I have been trying to use git for a project. It is hosted on his server, and I git clone it as: git clone [email protected]:/path/to/git/repos.git Pretty standard stuff, and it works great for a while. But every time one of us has added a large commit (which git supposedly handles very well), of the order of 100MB or so, the git repository gets kind of broken. Basically, at this point I will be able to push new changes and pull other changes (I think), but when I try to clone the repository in a fresh location using that command above, I get an error message that says: $git clone [email protected]:/path/to/git/repos.git Initialized empty Git repository in /local/path/to/repos/.git/ remote: Counting objects: 1455, done. remote: Compressing objects: 100% (1235/1235), done. error: git upload-pack: git-pack-objects died with error.s fatal: git upload-pack: aborting due to possible repository corruption on the remote side. remote: aborting due to possible repository corruption on the remote side. fatal: early EOF fatal: index-pack failed This has happened 3 or 4 times now, and it's always when I add a large commit. Any idea why this is happening? How can we fix it? We're both using Mac OSX Snow Leopard. Thanks! -M

    Read the article

  • decentralized development using git and git-svn

    - by CantGetANick
    We have 2-3 small teams of 2-3 people. We all use git for local and svn for central repository and git-svn got sync. This is works all the time except when we want to share our code between the team it self. So we have tried out git pull, this creates lots of conflicts and it does not detect that we are on the same tree. It fetches all the changes (same as clone then pull) Of course i dont want to clone full repo. every time I want to share. Please suggest a better flow. We can't get rid of central svn. We can't clone every time.

    Read the article

  • fatal: http://myserverip/home/git/example.git/info/refs not found: did you run git update-server-i

    - by bobobobo
    I followed this example to set up a git repository on my server. It worked, and I successfully pushed my code to it. But now, how do I pull or clone? Using the docs, I tried git clone http://REMOTE_SERVER/home/git/example.git .. But for me, I'm getting: fatal: http://myserverip/home/git/example.git/info/refs not found: did you run git update-server-info on the server? I ran git-update-server info, but nothing changed Edit: Ah, hold on. I changed it to git clone ssh://REMOTE_SERVER/home/git/example.git and I'm getting something.. it wants my user/pass, but how do I make the server public then not requiring login?

    Read the article

  • Cannot get git working

    - by Devin Dixon
    I'm trying to install my own git server with these instructions. http://cisight.com/how-to-setup-git-server-using-gitolite-in-ubuntu-11-10-oneiric/ But I am get stuck at this point. git clone --verbose [email protected]:testing.git Cloning into 'testing'... Permission denied (publickey). fatal: The remote end hung up unexpectedly And I think it has something to do with this: gitolite@ip-xxxx:~$ gl-setup tmp/john.pub key_read: uudecode Aklkdfgkldkgldkgldkgfdlkgldkgdlfkgldkgldkgdlkgkfdnknbkdnbkdnbkdnbkfnbkdfnbkdnfbkdfnbdknbkdnbkfnbkdbnkdbnkdfnbkd [email protected] failed fprint failed I always get the fail and I think its preventing me from cloning repo.The repo is there along with gitolite-admin.git repo. The permissions are this: drwxr-x--- 8 gitolite gitolite 4096 Jun 6 16:29 gitolite-admin.git drwxr-x--- 7 gitolite gitolite 4096 Jun 6 16:29 testing.git So my question is what am I missing here?

    Read the article

  • git commit –m “CodePlex now supports Git!”

    Finally, yes, CodePlex now supports Git! Git has been one of the top rated requests from the CodePlex community for some time: Admittedly, when we launched CodePlex, we never expected that at some point we would be running a source control system originally invented by Linus Torvalds to use for the Linux kernel. Though I would also say, nobody would have thought the open source ecosystem would be as important to Microsoft as it has become now. Giving CodePlex users what they ask for and supporting their open source efforts has always been important to us, and we have a long list of improvements planned, so stay tuned as we have more up our sleeves! Why Git? So why Git? CodePlex already has Mercurial for distributed version control and TFS (which also supports subversion clients) for centralized version control. The short answer is that the CodePlex community voted, loud and clear, that Git support was critical. Additionally, we just like it, we use Git on our team every day and making the DVCS workflows more available to the CodePlex community is just the right thing to do. Forks and Pull Requests One of the capabilities that distributed version control systems, such as Mercurial and Git, enable is the Fork and Pull Request workflow.  Just like with Mercurial, projects configured to use Git enable Forking the source and submitting contributions back via Pull Requests. The Fork/Pull Request workflow is a key accelerator to many open source projects and you will see improvements in our support coming later this year. More Choice With the addition of Git, now CodePlex has three options when it comes to Open Source project hosting. Projects can now select between TFS, Mercurial, and Git. Each developer has their own preferences, and for some, centralized version control makes more sense to them. For others, DVCS is the only way to go. We’re equally committed to supporting both these technologies for our users. You can get started today by creating a new project or contribute to an existing project by creating a fork. For help on getting started with Git on CodePlex, see our help documentation here. If you would like to switch your project to use Git, please contact us at CodePlex Support with your project information, and we will be happy to help you out. We're Listening CodePlex is your community, and we want to deliver the experiences you need to have a successful open source project. We want your ideas and feedback to make CodePlex a great development community.  The issue tracker on CodePlex is publicly available. Add suggestions or vote up existing suggestions. And you can always find us on Twitter, I’m @mgroves84; follow us to keep up to date with our latest releases: @codeplex

    Read the article

  • Git clone/pull across local network

    - by Tom Sarduy
    I'm trying to clone/pull a repository in another PC using Ubuntu Quantal. I have done this on Windows before but I don't know what is the problem on ubuntu. I tried these: git clone file:////pc-name/repo/repository.git git clone file:////192.168.100.18/repo/repository.git git clone file:////user:pass@pc-name/repo/repository.git git clone smb://c-pc/repo/repository.git git clone //192.168.100.18/repo/repository.git Always I got: Cloning into 'intranet'... fatal: '//c-pc/repo/repository.git' does not appear to be a git repository fatal: The remote end hung up unexpectedly or fatal: repository '//192.168.100.18/repo/repository.git' does not exist More: The other PC has username and password Is not networking issue, I can access and ping it. I just installed git doing apt-get install git (dependencies installed) I'm running git from the terminal (I'm not using git-shell) What is causing this and how to fix this? Any help would be great! UPDATE I have cloned the repo on Windows using git clone //192.168.100.18/repo/intranet.git without problems. So, the repo is accessible and exist! Maybe the problem is due user credentials?

    Read the article

  • Git clone on an ovh host server

    - by newben
    I want to do a git-clone from an ssh connection, on an ovh host-server, but it does not work: Here's the command I entered: git clone ssh :/ / [email protected] / www / (and all variations /. Git / www / .git, / www / .git / ... ) This is the message that I invariably get: fatal: '/ www': unable to chdir or not a git archive fatal: The remote end hung up unexpectedly Moreover, the command git clone "ssh :/ / [email protected] / ~ / forumdesthinktanks.git" responded with: Permission denied, please try again. [email protected] 's password: While the ftp password is correct. Finally, the commands git clone ssh :/ / [email protected] /. Git and git clone ssh :/ / [email protected] / ~ / forumdesthinktanks.git do not work (until the terminal's time out). I'm using a terminal from my Mac.

    Read the article

  • How do I start bash in 13.04?

    - by Maik Klein
    I have a bash script that I need to execute. It seems that I can't run in in my terminal because it has a slightly different syntax. I could run the first file like bash ./configure but it produces a makefile that I can not use. If I try bash make it tells me that it can't execute make. How do I run this make file in bash? I tried cd /usr/bin ./bash but it tells me that it can't find bash. So how do I start bash?

    Read the article

  • Does GIT have evil twin issues?

    - by Senthil A Kumar
    In ClearCase evil twin occurs when two files are found with the same name in two different versions of the directory, and If the element OIDs are different but the names are the same. In GIT the SHA1 id is always unique and file with same name always have different SHA1 id’s. We don’t have a concept of Evil twins, but there are likely cases where there is chance for 2 or more developers creating a file with different contents with same filename in the same directory. During merge, when both files are completely different, there are chances of the developers to keep his changes alone and leave other changes resulting in code loss. Can anyone let me know if there will be issues in GIT similar to ClearCase or sine each SHA1 id is unique there won't be any Evil twin issues in GIT.

    Read the article

  • What git binary I am using?

    - by Kuroki Kaze
    I just installed git 1.6.0 from source, but strange thing now happening to me: debian:~/git# git version git version 1.5.6.5 debian:~/git# which git /usr/local/bin/git debian:~/git# /usr/local/bin/git version git version 1.6.0 How can I make 1.6.0 binary default? System is Debian Lenny. Git installed with simple ./configure && make && make all.

    Read the article

  • Git over port 443

    - by slayerIQ
    I have a git repository on my server i can ssh over port 443. But now i want to pull from that server and push to it but git gives me connection refused. I think it's connecting over port 22 but i want it to connect over 443. I use tortoiseplink to connect with how can i make it connect through port 443 when pushing or pulling ?

    Read the article

  • Git tutorial: Understanding git pull and branches (using a specific example repo)

    - by dreftymac
    Backround: Suppose I have the following Git URLs (hosted on github) http://github.com/mikl/drupal.git git://github.com/mikl/drupal.git (Git read-only) I am interested in having a local copy of this repository so I can pratice working with branches in git and see how my local working tree can change depending on which branch I am working with. Questions: To get started, I set up a local directory and do git clone git://github.com/mikl/drupal.git ... Will this clone all of the branches? Or will it only clone master? The web front-end for github gives me a "drop down" menu that allows me to switch branches ... Does changing this drop-down actually change which branch I will be grabbing when I run git clone? If I want a new copy of this repository on my local machine, but I am interested in only two branches of this repository and I want to ignore all the rest, what command do I use to ensure I clone only those two branches and nothing else (assume one of the branches is master)?

    Read the article

  • Best way to fork SVN project with Git

    - by Jeremy Thomerson
    I have forked an SVN project using Git because I needed to add features that they didn't want. But at the same time, I wanted to be able to continue pulling in features or fixes that they added to the upstream version down into my fork (where they don't conflict). So, I have my Git project with the following branches: master - the branch I actually build and deploy from feature_* - feature branches where I work or have worked on new things, which I then merge to master when complete vendor-svn - my local-only git-svn branch that allows me to "git svn rebase" from their svn repo vendor - my local branch that i merge vendor-svn into. then i push this (vendor) branch to the public git repo (github) So, my flow is something like this: git checkout vendor-svn git svn rebase git checkout vendor git merge vendor-svn git push origin vendor Now, the question comes here: I need to review each commit that they made (preferably individually since at this point I'm about twenty commits behind them) before merging them into master. I know that I could run git checkout master; git merge vendor, but this would pull in all changes and commit them, without me being able to see if they conflict with what I need. So, what's the best way to do this? Git seems like a great tool for handling forks of projects since you can pull and push from multiple repos - I'm just not experienced with it enough to know the best way of doing this. Here's the original SVN project I'm talking about: https://appkonference.svn.sourceforge.net/svnroot/appkonference My fork is at github.com/jthomerson/AsteriskAudioKonf (sorry - I couldn't make it a link since I'm a new user here)

    Read the article

  • git-svn guestion about creating local branches

    - by leeed25d
    Is there a way to create a local branch, or modify an existing local branch, in such a way that it cannot be dcommit'ed to the svn repo? Here's a description of the scenario. git checkout -b local.farBranch remotes/farBranch git checkout -b patched.local.farBranch git merge local.patches <work on patched branch && test> <do not commit onto patched.local.farBranch> git checkout local.farBranch git commit -am "some changes" git rebase local.farBranch patched.local.farBranch <another work test cycle> git checkout local.farBranch git commit -am "last changes" git svn dcommit Now, I never want to dcommit patched.local.farBranch (which is tracking remotes/farBranch) because that would put my local patches into the SVN repository. This is not a fatal problem but it is a pain in the keester because the patch has to be removed when the SVN farBranch is eventally (SVN) merged onto the trunk. So what I am looking for is a way to prevent this git checkout patched.local.farBranch git svn dcommit <<== ERROR git checkout local.farBranch git svn dcommit <<== OK

    Read the article

  • Git - switching between branches in the middle of work

    - by Art
    For various reasons (code review mostly) I need to switch from current development branch to other branches quite often. Currently, I use either 'git stash' to shelve the uncommitted changes, checkout other branch, then switch back and do 'git stash apply' However, sometimes I'd have some newly added files there, which are not tracked. Unfortunately, stashing does not affect them. In this case I'd have to add them to the index and stash. What I am looking here for is a workflow where I'd have to perform a minimal set of actions to switch the branches, preferably avoiding adding of files into the index.

    Read the article

  • Apache user owns git project root, with git-http-backend setup, but still having permissions problems

    - by Luke
    I've setup git-http-backend on my vps server (CentOS), under one of its users. The apache user owns the git project root directory - /home/theuser/git/, as below: drwxrwxr-x 3 apache apache The apache user also owns everything inside that directory. But I'm still getting the following error in git when trying to push: error: unpack failed: unpack-objects abnormal exit The apache error log shows the following error: error: insufficient permission for adding an object to repository database ./objects I've tried every combination of user permissions and enabled read/write access, but not getting anywhere. Should the git user own this folder? Can someone explain exactly what user should own this folder, or what steps I might take to fix this problem?

    Read the article

  • Perforce Git Fusion apporte de nouvelles capacités flexibles pour Git, l'outil téléchargeable gratuitement

    Perforce Git Fusion apporte de nouvelles capacités flexibles pour Git l'outil téléchargeable gratuitement Résoudre les difficultés inhérentes à l'utilisation de Git si le projet ne peut pas proprement s'inviter dans un unique dépôt Git : c'est le but essentiel de Perforce Git Fusion. L'outil met fin à ces difficultés, tout en offrant aux utilisateurs la possibilité de travailler de la façon qu'ils préfèrent. Les développeurs peuvent ainsi continuer d'utiliser Git sans modifications, tandis que les responsables de la distribution et les administrateurs ont la flexibilité, s'ils le souhaitent, de préserver leurs outils et processus favoris. Pour rappel, Git est un logiciel de gestio...

    Read the article

  • Why is Git telling me "Your branch is ahead of 'origin/master' by 11 commits." and how do I get it t

    - by spilth
    I'm a Git newbie. I recently moved a Rails project from Subversion to Git. I followed the tutorial here: http://www.simplisticcomplexity.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-a-git-repository/ I am also using unfuddle.com to store my code. I make changes on my Mac laptop on the train to/from work and then push them to unfuddle when I have a network connection using the following command: git push unfuddle master I use Capistrano for deployments and pull code from the unfuddle repository using the master branch. Lately I've noticed the following message when I run "git status" on my laptop: # On branch master # Your branch is ahead of 'origin/master' by 11 commits. # nothing to commit (working directory clean) And I'm confused as to why. I thought my laptop was the origin... but don't know if either the fact that I originally pulled from Subversion or push to Unfuddle is what's causing the message to show up. How can I: Find out where Git thinks 'origin/master' is? If it's somewhere else, how do I turn my laptop into the 'origin/master'? Get this message to go away. It makes me think Git is unhappy about something. My mac is running Git version 1.6.0.1. When I run git remote show origin as suggested by dbr, I get the following: ~/Projects/GeekFor/geekfor 10:47 AM $ git remote show origin fatal: '/Users/brian/Projects/GeekFor/gf/.git': unable to chdir or not a git archive fatal: The remote end hung up unexpectedly When I run git remote -v as suggested by Aristotle Pagaltzis, I get the following: ~/Projects/GeekFor/geekfor 10:33 AM $ git remote -v origin /Users/brian/Projects/GeekFor/gf/.git unfuddle [email protected]:spilth/geekfor.git Now, interestingly, I'm working on my project in the geekfor directory but it says my origin is my local machine in the gf directory. I believe gf was the temporary directory I used when converting my project from Subversion to Git and probably where I pushed to unfuddle from. Then I believe I checked out a fresh copy from unfuddle to the geekfor directory. So it looks like I should follow dbr's advice and do: git remote rm origin git remote add origin [email protected]:spilth/geekfor.git

    Read the article

  • Bash script to create mass series of directories

    - by Volomike
    I need to create a Bash script to go into every user's home folder, seek out a wp-content folder, create a directory uploads under it, and then chmod 0756 uploads. How do I achieve this? I imagine I need to use find with a regexp/regex, and then tell it to run another bash script on the results.

    Read the article

  • Unable to delete a file using bash script

    - by user3719091
    I'm having problems removing a file in a bash script. I saw the other post with the same problem but none of those solutions solved my problem. The bash script is an OP5 surveillance check and it calls an Expect process that saves a temporary file to the local drive which the bash script reads from. Once it has read the file and checked its status I would like to remove the temporary file. I'm pretty new to scripting so my script may not be as optimal as it can be. Either way it does the job except removing the file once it's done. I will post the entire code below: #!/bin/bash #GET FLAGS while getopts H:c:w: option do case "${option}" in H) HOSTADDRESS=${OPTARG};; c) CRITICAL=${OPTARG};; w) WARNING=${OPTARG};; esac done ./expect.vpn.check.sh $HOSTADDRESS #VARIABLES VPNCount=$(grep -o '[0-9]\+' $HOSTADDRESS.op5.vpn.results) # Check if the temporary results file exists if [ -f $HOSTADDRESS.op5.vpn.results ] then # If the file exist, Print "File Found" message echo Temporary results file exist. Analyze results. else # If the file does NOT exist, print "File NOT Found" message and send message to OP5 echo Temporary results file does NOT exist. Unable to analyze. # Exit with status Critical (exit code 2) exit 2 fi if [[ "$VPNCount" > $CRITICAL ]] then # If the amount of tunnels exceeds the critical threshold, echo out a warning message and current threshold and send warning to OP5 echo "The amount of VPN tunnels exceeds the critical threshold - ($VPNCount)" # Exit with status Critical (exit code 2) exit 2 elif [[ "$VPNCount" > $WARNING ]] then # If the amount of tunnels exceeds the warning threshold, echo out a warning message and current threshold and send warning to OP5 echo "The amount of VPN tunnels exceeds the warning threshold - ($VPNCount)" # Exit with status Warning (exit code 1) exit 1 else # The amount of tunnels do not exceed the warning threshold. # Print an OK message echo OK - $VPNCount # Exit with status OK exit 0 fi #Clean up temporary files. rm -f $HOSTADDRESS.op5.vpn.results I have tried the following solutions: Create a separate variable called TempFile that specifies the file. And specify that in the rm command. I tried creating another if statement similar to the one I use to verify that file exist and then rm the filename. I tried adding the complete name of the file (no variables, just plain text of the file) I can: Remove the file using the full name in both a separate script and directly in the CLI. Is there something in my script that locks the file that prevents me from removing it? I'm not sure what to try next. Thanks in advance!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >