wget command wont work in cron?
I am using wget command in a script to hit a URL and fetch its content. I run the script manually in command prompt, it works fine. But setting same script in cron is not working.
wget -o wgetlog2 --output-document=wgettesting2.html "URL"
Any help would be appreciated.
Related
I'm having the following issue. When I execute this command sfdx profile:field:add -n "Account.Test" -m re -p "Test" from a Bash script, it's all fine.
However, when I try to execute the following:
sfdx profile:field:add -n "Account.Test" -m re -p "Test Test"
I get this error: 'C:\Program' is not recognized as an internal or external command
When I run the same command in the terminal, it works fine. It's just when I put it inside a bash script that this error happens.
Currently running this on Windows 10.
I'm 100% sure it's the space in that last parameter, I am just not sure how to get around it. Can anyone help?
I want to execute the curl command in Shell Script with Jenkins.
Executing Shell Script alone from remote works very well.
However, running shell scripts through Jenkins will result in an infinite load as shown below.
Let me know how to fix it.
myShellScript
#!/bin/sh
echo "curl Start"
curl --request GET 'http://127.0.0.1:8080/server/someting/work'
echo "curl End"
================================================
my jenkins Execute shell script on remote host using ssh
==================================================
Jenkins Log Result
It's been like that for an hour, like the image below.
Connection logs do not exist in the URL.
And
ssh account#my-test-server "/home/account/folder/myShellScript.sh"
It worked well when I executed the command as above.
Please help me.
I am trying to export ROS_MASTER_URI from a shell script and then launch roscore. In my .sh file I have:
roxterm --tab -e $SHELL -c "cd $CATKIN_WS; $srcdevel; export ROS_MASTER_URI='http://locahost:1234'; roscore -p 1234"
When I do this, however, I get the following error in the roscore tab:
WARNING: ROS_MASTER_URI [http://locahost:1234] host is not set to this machine.
When I echo the ROS_MASTER_URI in this tab, it says that it is localhost:1234, which is correct. When I manually execute these commands, it works correctly and roscore launches without any issues. I am not sure why it does not work when launched from a bash file.
It was just a typo- missed the l in localhost. All working now.
I have a shell script(.sh file) which logs in to ubuntu server using ssh command. Once logged in i want to do the following commands:
sudo -i
su web
I want to incorporate the above commands in the same .sh file. How do i do it? Thanks
I am developing a TIBCO application and need to be able to run a scp command from an external command resource.
Anyway the issue boils down to being able to log in to bash.exe then run my scp command in the same line.
it works when I run (from cmd.exe)
c:\cygwin\bin\bash.exe --login
(I enter bash)
Then I can run my scp statement just fine
scp account#server:~mysourcedirectory/targetfilename* /cygdrive/c/targetfolder
I want to do these two things in the same line but it doesnt work, aka
c:\cygwin\bin\bash.exe --login -c scp account#server:~mysourcedirectory/targetfilename* /cygdrive/c/targetfolder
will fail. What am I doing wrong and how can i run this command in one go?
Thanks
You have to quote the command.
c:\cygwin\bin\bash.exe --login -c "scp account#server:~mysourcedirectory/targetfilename* /cygdrive/c/targetfolder"
Tested using cmd in wine in gnu/linux. Single quotes did not work, I don't know all the quoting rules for cmd. But the above did work.