Windows Task with Bash script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Windows Task with Bash script
# 8  
Old 08-11-2015
Are you sure \cygdrive\d\Load\tmp_d_.csv really exists? Doesn't windows convention need a drive letter to indicate a full path?
# 9  
Old 08-11-2015
Code:
\cygdrive\d\Load\tmp_d_.csv

It's a correct linux directory.
Code:
D:\Load

It's give me the same error.
# 10  
Old 08-11-2015
I was rather thinking of sth. like C:\cygdrive\d\Load\tmp_d_.csv And certainly \cygdrive\d\Load\tmp_d_.csv is not a correct linux directory.
# 11  
Old 08-11-2015
I tried it.
Error
Code:
ERROR 2 (HY000) at line 1: File 'C:\cygdrive\d\CasusLoad\tmp_d_.csv' not found (Errcode: 2)

# 12  
Old 08-11-2015
Linux directories are separated by / not \ as in Windows.

So maybe its:
Code:
/cygdrive/d/CasusLoad/tmp_d_.csv

hth

EDIT:
Figured, according to output of last post of previous page, it seems that the path passed - somewhere - gets transformed
# 13  
Old 08-11-2015
Just in case it is not clear.
Quote:
/cygdrive/d/CasusLoad/tmp_d_.csv
That does exist only when working from within cygwin.

Code:
\cygdrive\d\CasusLoad\tmp_d_.csv

Does not exist in Windows nor when running cygwin

Code:
/cygdrive/d/CasusLoad/tmp_d_.csv

Is the equivalent to D:\CasusLoad\tmp_d_.csv if you want to locate it using Windows Explorer.
You can know how it will be mapped when running cygwin by issuing the mount command.
This User Gave Thanks to Aia For This Post:
# 14  
Old 08-12-2015
1.
Code:
./tmp_d_.csv

Work well in cygwin
Give Error in Window Task
Code:
ERROR 2 (HY000) at line 2: File '.\xxx.csv' not found (Errcode: 2)

Windows change
Code:
/

to
Code:
\

in Error
2.
Code:
/cygdrive/d/Load/tmp_d_.csv

Doesn't work in cygwin.
Doesn't work in Windows Task
Error :
Code:
ERROR 2 (HY000) at line 1: File '\cygdrive\d\Load\tmp_d_.csv' not found(Errcode: 2)

3.
Code:
D:\CasusLoad\tmp_d_.csv

Doesn't work in cygwin.
Doesn't work in Windows Task
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script for database task.

Hi, I need help in creating script for "User password reset in database" by logging into database from linux server and resetting the user password. Could you please provide the script for this task? Steps are given below. 1. Login into database from server sqlplus... (5 Replies)
Discussion started by: Maddy123
5 Replies

2. Shell Programming and Scripting

Run a task in a script at a particular time

I have an ETL process that triggers a shell script. This script picks the files created by the ETL process and does an SFTP. These are huge files. Due to infrastructure limitations, we need to trigger the actual SFTP part only during the 2nd, 16th, 31st and 46th minute of an hour. Please let me... (2 Replies)
Discussion started by: vskr72
2 Replies

3. Shell Programming and Scripting

How to do one line bash schedule task?

This seems to work: https://www.unix.com/shell-programming-scripting/179705-how-run-cygwin-bash-windows-scheduled-task.html However, I was hoping to avoid writing a 2 line bat files to invoke my cygwin scripts as a scheduled task (since I'm making lots scheduled tasks). I was hoping this would... (1 Reply)
Discussion started by: siegfried
1 Replies

4. Shell Programming and Scripting

Whether Shell script can do this task ???

In following attached 748phy.xls file, fifth column is ST_Date, which contains time and dates in this format 22-11-2012 7:54:54 PM in single column I want it to split in this format either 1st column 22/11/2012 and in second column 7:54:54 PM Or like this in separate... (13 Replies)
Discussion started by: Akshay Hegde
13 Replies

5. Shell Programming and Scripting

Can any programmer do this task in shell script...

input file's one set header is this, ----------------------------------------------------- OUTPUT FROM ASCII FILE: CAST #1 ----------------------------------------------------- CC Cruise Latitude Longitude YYYY MM DD Time Cast #Levels CA 8504 50.083 -144.883 1970 1 2... (6 Replies)
Discussion started by: Akshay Hegde
6 Replies

6. Shell Programming and Scripting

How to run Cygwin bash from windows scheduled task?

Hmmm.... I love these forums because I always get great prompt responses and I want to ask a question about running bash on windows. Is that allowed? Now I know I can install cygwin cron and run bash that way. Can I run bash from windows schedule task? How? thanks siegfried (1 Reply)
Discussion started by: siegfried
1 Replies

7. Shell Programming and Scripting

command task script

ksh $CODE/dis/scripts/IS_BTEQ_LZ_TABLE_AUDIT.sh DIS_BTEQ LZ_DIS_LOAD_LOG_KEY > $CODE/dis/logs/lz_table_audit_`date '+%Y%m%d_%H%M%S'`.log 2>&1 Can some one tell me what the above script is doing? As per my understanding we are executing the script and sending the output to a log file. The... (4 Replies)
Discussion started by: karthikkasarla
4 Replies

8. Shell Programming and Scripting

last task for my script

hi, infile- create table salary ( occupation_code char(40), earnings decimal(10,2), occ_yearend integer ); outfile- salary:create table salary salary:( occupation_code char(40), salary: earnings decimal(10,2), salary: occ_yearend integer salary:); Thanks. (4 Replies)
Discussion started by: dvah
4 Replies

9. UNIX for Dummies Questions & Answers

BASH: Change alias to script to add a task

Hi. I use an alias, "homeperm" as shorthand for curl -o. Since most of what I download via cUrl is graphic image files -- jpeg files -- I'd like to be able to change this alias to a script, or use it to invoke a function, which will not only download the file but date-stamp it using Exiv2 in... (4 Replies)
Discussion started by: SilversleevesX
4 Replies

10. Shell Programming and Scripting

comment and Uncomment single task out of multiple task

I have a file contains TASK gsnmpproxy { CommandLine = $SMCHOME/bin/gsnmpProxy.exe } TASK gsnmpdbgui { CommandLine = $SMCHOME/bin/gsnmpdbgui.exe I would like to comment and than uncomment specific task eg TASK gsnmpproxy Pls suggest how to do in shell script (9 Replies)
Discussion started by: madhusmita
9 Replies
Login or Register to Ask a Question