Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Shell script not working but command works in command prompt Post 302965691 by RudiC on Tuesday 2nd of February 2016 05:14:44 AM
Old 02-02-2016
Could have been lost when copy/pasting the script. Compare above error message to this:
Code:
cat file1 | gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz
bash: /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz: No such file or directory

If you now imagine a <CR> after the ".gz", you'll have exactly the line posted.
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

cd command is not working in my shell script

Hi, Following is my shell script. #!/bin/tcsh view=$1 image=$2 objfld="obj-ppc-$image" echo $view echo $image echo $objfld echo "cleartool setview $view" cleartool setview $view; cd `cd /vob/ios/sys`; In this "cd" is not working and not getting any error. my shell is "tcsh"... (3 Replies)
Discussion started by: amitrajvarma
3 Replies

2. UNIX for Dummies Questions & Answers

running command prompt executable file in shell script

hi i have file extentioned with test.vbs. i am able to run this file n execute through command promt but i dont know how to run in shell script example: file name is test.vbs which contains strSoundFile = "C:\windows\Media\Notify.wav" Set objShell = CreateObject("Wscript.Shell") strCommand... (5 Replies)
Discussion started by: atl@mav
5 Replies

3. Shell Programming and Scripting

how the typeset command works in shell script

typeset -l section section=${2:-.} what does these 2 lines meaning? (1 Reply)
Discussion started by: venkatababu
1 Replies

4. Shell Programming and Scripting

help with shell script: cp command not working, but mv command works...

Hello. I would like to ask your help regarding the cp command. We are using a cp command to create a back-up copy of our file but to no avail. It's just not working. We already checked the file and directory permissions and all seems correct. We have a script (ftp.script) which calls on... (1 Reply)
Discussion started by: udelalv
1 Replies

5. UNIX for Dummies Questions & Answers

FTP that works correctly in command prompt and shows issue in UNIX server

Hi All, FTP ports opens with the given user name and password and allows to download file through COMMAND PROMPT. Code as below: H:\>ftp ftpxxxxx Connected to entvc2ft07-pub.xxxxx.com. 220 Microsoft FTP Service User (entvc2ft07-pub.xxxxx.com:(none)): userxxxxx 331 User name okay, need... (1 Reply)
Discussion started by: vijayalakshmi.r
1 Replies

6. Shell Programming and Scripting

Use Unix shell script to open Windows command prompt (cmd)

Hello, I work on Windows and I use Putty to access a remote UNIX server. I am trying to build a shell script that will have as main task to open the Windows command prompt (cmd) and run some Windows commands thereafter. The commands are actually file transfer commands that will download a file... (14 Replies)
Discussion started by: rookie2785
14 Replies

7. Shell Programming and Scripting

SH script, variable built command fails, but works at command line

I am working with a sh script on a solaris 9 zone (sol 10 host) that grabs information to build the configuration command line. the variables Build64, SSLopt, CONFIGopt, and CC are populated in the script. the script includes CC=`which gcc` CONFIGopt=' --prefix=/ --exec-prefix=/usr... (8 Replies)
Discussion started by: oly_r
8 Replies

8. Shell Programming and Scripting

perl: Command works in terminal, but not in shell script

Hi, the following command works in the terminal no problem. samtools view -h rawlib.bam | perl -ne '{ @line = split( /\s+/ ); $match = 0; while( $line =~ /(\d+)M/g ) { $match = $match + $1 } if( $match >= 80 || $_ =~ /^\@/ ) { print $_ } }' | java -Xmx12G -jar... (8 Replies)
Discussion started by: jdilts
8 Replies

9. Shell Programming and Scripting

sed command not working inside ksh script but works fine outside

Hi, I am a bit confused ,why would a sed command work fine outside of ksh script but not inside. e.g I want to replace all the characters which end with a value and have space at end of it. so my command for it is : sed -i "s/$SEPARATOR /$SEPARATOR/g" file_name This is working fine in... (8 Replies)
Discussion started by: vital_parsley
8 Replies

10. Shell Programming and Scripting

Replace string works on command-line but fails when run from shell script

I wish to replace "\\n" with a single white space. The below does the job on command-line: $ echo '/fin/app/scripts\\n/fin/app/01/sql' | sed -e 's#\\\\n# #g'; /fin/app/scripts /fin/app/01/sql However, when i have the same code to a shell script it is not able to get me the same output:... (8 Replies)
Discussion started by: mohtashims
8 Replies
oarnodes(1)							   OAR commands 						       oarnodes(1)

NAME
oarnodes - show information about the nodes managed by OAR. SYNOPSIS
oarnodes [ -a | -s | -r <integer> | --sql <sql_properties> | -l | -h | -V ] [<list of nodes>] [ -e [<date>] | -X | -Y | -D ] DESCRIPTION
Display information about the nodes managed by OAR. OPTION
-a, --all Show all resources with their properties. -r, --resource Show only the resource whose id is given as parameter with its properties. -s, --state Show the states of the resources. -l, --list Show the nodes list. -e, --events Print events related to a node: either since the date given as parameter or the last 20. --sql Select the resources which match the SQL where clause given as parameter (e.g. "state = 'Suspected'") and display them. -D, --DUMPER Print result in Perl Data::Dumper format. -X, --XML Print result in XML format. -Y, --YAML Print result in YAML format. -J, --JSON Print result in JSON format. -V, --version Print OAR version number. -h, --help Show the help message. SEE ALSO
oarsub(1), oardel(1), oarstat(1), oarhold(1), oarresume(1) COPYRIGHTS
Copyright 2008 Laboratoire d'Informatique de Grenoble (http://www.liglab.fr). This software is licensed under the GNU Library General Public License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. oarnodes 2012-05-23 oarnodes(1)
All times are GMT -4. The time now is 07:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy