Sponsored Content
Top Forums Shell Programming and Scripting SEnding a process to backgorund (&) in here document Post 302789265 by acelau on Wednesday 3rd of April 2013 11:43:58 AM
Old 04-03-2013
Thanks for your reply.

Actually this is what i am doing.

Code:
#!/bin/ksh
FILE="a.pipe"
DS="DS1"
TIMESTAMP="TS"

ssh root@192.168.0.112 'ksh' <<ENDSSH
  # commands to run on remote host

for i in {1..8}
do
if [[ ! -e $DS\_$TIMESTAMP\_\$i.pipe ]]
then
mkfifo $DS\_$TIMESTAMP\_\$i.pipe
fi

gzip -c \< $DS\_$TIMESTAMP\_\$i.pipe \> $DS$TIMESTAMP\$i.gz &

done

ENDSSH

I am trying to trigger this script to a remote server to setup 8 pipe for 'on the fly' compression. I'm always getting

Code:
[root@twslinux1 ~]# ./a.sh
gzip: <: No such file or directory                                                                                           àD\QDS1_TS_1.pipegzip: >: No such file or directory
gzip: DS1TS1.gz: No such file or directory
gzip: &: No such file or directory
gzip: <: No such file or directory                                                                                           åD\QDS1_TS_2.pipegzip: >: No such file or directory
gzip: DS1TS2.gz: No such file or directory
gzip: &: No such file or directory
gzip: <: No such file or directory                                                                                           êD\QDS1_TS_3.pipegzip: >: No such file or directory
gzip: DS1TS3.gz: No such file or directory
gzip: &: No such file or directory
gzip: <: No such file or directory                                                                                           9J\QDS1_TS_4.pipegzip: >: No such file or directory
gzip: DS1TS4.gz: No such file or directory
gzip: &: No such file or directory
gzip: <: No such file or directory                                                                                           9J\QDS1_TS_5.pipegzip: >: No such file or directory
gzip: DS1TS5.gz: No such file or directory
gzip: &: No such file or directory
gzip: <: No such file or directory                                                                                           9J\QDS1_TS_6.pipegzip: >: No such file or directory
gzip: DS1TS6.gz: No such file or directory
gzip: &: No such file or directory                                                                                           9J\QDS1_TS_7.pipegzip: <: No such file or directory
gzip: >: No such file or directory
gzip: DS1TS7.gz: No such file or directory
gzip: &: No such file or directory                                                                                           9J\QDS1_TS_8.pipegzip: <: No such file or directory
gzip: >: No such file or directory
gzip: DS1TS8.gz: No such file or directory
gzip: &: No such file or directory
[root@twslinux1 ~]# vi a.sh
[root@twslinux1 ~]# ./a.sh                                                                                                   àD\QDS1_TS_1.pipegzip: <: No such file or directory
gzip: >: No such file or directory
gzip: DS1TS1.gz: No such file or directory

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sending Emails to a unix process

Hi , I need to have a unix process which is setup to read all incoming mail for some user and process the same. How tough it is to code the same.Is there any way that we can download some shell scripts for the same from some internet site Kindly help. (2 Replies)
Discussion started by: xsriniva
2 Replies

2. Shell Programming and Scripting

Sending email with text & attachment using mailx

I spent some time working this out, with a little help from various forums, and thought the community would like to know : Here is how you can send an email from a single Unix command line : /usr/bin/echo "Email text\nNew line\nAnother new line" >x | uuencode sourcefile.txt sourcefile.txt |... (3 Replies)
Discussion started by: haryadoon
3 Replies

3. Shell Programming and Scripting

creating & sending formatted (with bolds & colors) CSV

Hi , I have a situation. Need is to create & send a formatted file with header in BOLD & colored & some sequel results as a content. I know echo -e \033 command, but its scope is limited in PUTTY. How to retain the formatting out of Putty; say after someone opens a email attachment... (2 Replies)
Discussion started by: infaWorld
2 Replies

4. Shell Programming and Scripting

Issue in mail sending process

Hi I created one CSV file and i need to append some message in the content of my mail. $sales=sales.dat $sales_csv=sales.csv $sales_report=sales.txt this is the command am using it. echo "sales for `date`"| read subject uuencode $sales $sales_csv | mailx -ms "${subject}."... (2 Replies)
Discussion started by: bobprabhu
2 Replies

5. Shell Programming and Scripting

sending email as background process

Hi All, Solaris Bash v3x I have a script that accepts an error code, and if the error code is not 0 then an email is sent using mailx to details the error. I want to be able to implement the functiuonlity whereby i can send the email in a background process so the script can continue with... (3 Replies)
Discussion started by: satnamx
3 Replies

6. UNIX for Dummies Questions & Answers

Sending signal from child to parent process!

Hi All, I facing a problem in handling signals between parent process communication. I am trying to send a signal(SIGINT) from child to parent. I am using kill function to do so and I am trying to read the signal using sigaction(). But the program is ending abruptly and I am not able to figure out... (4 Replies)
Discussion started by: vkn_1985
4 Replies

7. UNIX for Advanced & Expert Users

Sending keystrokes to another process

The third-party ERP system used by our company has no idle-out facility and we sometimes have issues because users simply walk away from their computers and leave sessions logged in for hours or even go home without logging out. (We are in a factory environment so it is hard to raise the care... (7 Replies)
Discussion started by: Wayne Ivory
7 Replies

8. Shell Programming and Scripting

Readin document & creating path

Need a way to read a file in who every line is a path to a directory and make shortcut to that directory on a specific place. Example: line in the document /media/gogo/6651-FEAB/Desktop/ /media/gogo/6651-FEAB/Desktop/alex/ /media/gogo/6651-FEAB/linux/ ... (3 Replies)
Discussion started by: gogok_bg
3 Replies

9. Solaris

Identify process sending ldap requests to old DNS server

Hi, I have a Solaris 10 system, which appears to be sending out LDAP queries to a server that is due to be decomissioned. Is there a way to identify which process is sending out these queries? The problem is that the local port constantly changes, and the connections do not stay open long... (3 Replies)
Discussion started by: badoshi
3 Replies
let(1)                                                             User Commands                                                            let(1)

NAME
let - shell built-in function to evaluate one or more arithmetic expressions SYNOPSIS
ksh let arg... DESCRIPTION
ksh Each arg is a separate "arithmetic expression" to be evaluated. EXIT STATUS
The following exit values are returned: 0 The value of the last expression is non-zero. 1 The value of the last expression is zero. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
ksh(1), set(1), typeset(1), attributes(5) SunOS 5.10 15 Apr 1994 let(1)
All times are GMT -4. The time now is 05:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy