Sponsored Content
Full Discussion: recognizing * character
Top Forums Shell Programming and Scripting recognizing * character Post 89782 by csejl on Tuesday 15th of November 2005 09:13:07 PM
Old 11-15-2005
recognizing * character

i have a short script that takes a filename and secure copies the file to a remote machine. i'd like to be able to take a * character and secure copy all the files in the directory.

first of all, how would i compare $1 to see if it's a * character?

if [ $1 = '*' ] or [ $1 = '\*' ] didn't do it.

second question is how would i tell the shell script to do 'scp * user@<ip>:/'? or do i have to do it one by one in a loop?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

recognizing *.* in find

hi folks, I am trying to write a script for deleting all the files which are older than "N" days from current directory. CODE: FileName="*.*" NumDays=-1 echo $FileName echo $NumDays find * -prune -name $FileName -mtime $NumDays -exec rm {} \; Now the problem here is when i... (3 Replies)
Discussion started by: amarnath
3 Replies

2. UNIX for Advanced & Expert Users

Crontab not recognizing the jar files

Hi All, I am using crontab which execute a shell script. In the shell script, I am executing a java program. This Java program requires the jar files. The cron job file ' cronfile.txt ' contents: MAILTO="raju_utla@dcis.uohyd.ernet.in" 0-59 * * * *... (0 Replies)
Discussion started by: rajuutla
0 Replies

3. UNIX for Dummies Questions & Answers

Crontab not recognizing the jar files

Hi All, I am using crontab which execute a shell script. In the shell script, I am executing a java program. This Java program requires the jar files. The cron job file ' cronfile.txt ' contents: MAILTO="raju_utla@dcis.uohyd.ernet.in" 0-59 * * * *... (4 Replies)
Discussion started by: rajuutla
4 Replies

4. Shell Programming and Scripting

Recognizing an argument in csh

I will be passing an argument to a csh script The script can be either of two forms For example, either script.csh zloc=5/10 or script.csh zloc=5/10/20 So there can be either two values or three values. How can I distinguish which one the user has inputted? I have made... (1 Reply)
Discussion started by: kristinu
1 Replies

5. Solaris

Solaris not recognizing RAID 5 disks

I've just installed Sol 10 Update 9 on a Sun 4140 server and have a RAID 1 configuration (2 136 Gb drives) for the OS and have created a RAID 5 array (6 136 GB) drives. When i log into the system I am unable to see the RAID 5 disks at all. I've tried using the devfsadm command but no luck and... (9 Replies)
Discussion started by: goose25
9 Replies

6. Shell Programming and Scripting

sed and recognizing a runtime parameter

I thought I posted this before, but cannot see the post, so will re-post. Apologies if it now appears twice ! My script prompts for a 7 digit parameter : read f1 I then run a find command to search for files with $f1 in its contents : find . -print | grep $f1 {file} > temp1 I then run a cut... (1 Reply)
Discussion started by: malts18
1 Replies

7. Solaris

Solaris 9 not recognizing CDROM drive

Hello, I've read many posts that offer tips on how to mount a CDROM but I haven't seen any on how to get the system to recognize the CDROM drive. I was transferring files from CDROM to the hard drive successfully. I entered the third CDROM and the system refused to automount it. I tried... (2 Replies)
Discussion started by: TrueSon
2 Replies

8. Red Hat

VMBox not Recognizing eth0 on RH.

Hello, I re-installed my laptop and installed a new copy of VMBOX, I created a VM Machine with my Rhel5 and a CEntos copy as well. I am using a laptop HP DV4, I use wireless on the laptop. Usually when I boot up in to either machine I would get eht0 and lo as usual now I just don't get... (4 Replies)
Discussion started by: NelsonC
4 Replies

9. Filesystems, Disks and Memory

Recognizing storage from server

Hi, I need to know what are the storages attached to some of our corporate servers. I run this command from the server only to get a list of WWNs : # /usr/local/bin/evainfo -a Devicefile Array WWNN Capacity ... (1 Reply)
Discussion started by: anaigini45
1 Replies

10. Shell Programming and Scripting

Script program is not recognizing the -w

Sorry I put -r I ment to out -w but its not perform none of -w, -r, -x flags Using centos 6.4 #!/bin/bash echo -e "enter the name of file :\c" read file_name if then if then echo "Type some text date. Tp quit press crtl-" cat >> $file_name ... (2 Replies)
Discussion started by: zbest1966
2 Replies
RFCP(1) 							Rfio User Commands							   RFCP(1)

NAME
rfcp - Remote file copy SYNOPSIS
rfcp [ -s size ] [ -v2 ] filename1 filename2 rfcp [ -s size ] [ -v2 ] filename directory On Windows only: rfcp [ -a ] [ -b ] [ -s size ] [ -v2 ] @command_file DESCRIPTION
The remote file I/O copy program provides an interface to the shift remote file I/O daemon (rfiod) for transferring files between remote and/or local hosts. Each filename or directory argument is either a remote file name of the form: hostname:path or a local file name (not containing the :/ character combination). The standard input is supported with the - character. Then directory in output is not supported. OPTIONS
-a tells rfcp that the source file is ASCII text (Windows/NT only) -b tells rfcp that the source is a binary file (Windows/NT only) -s size If specified, only size bytes will be copied -v2 If specified, forces the RFIO V.2 protocol. Otherwise, V.3 (streaming mode) is used. RETURN CODES
0 Ok. 1 Bad parameter. 2 System error. 3 Unknown error. 16 Device or resource busy. 28 No space left on device. 196 Request killed. 198 Stager not active. 200 Bad checksum. SEE ALSO
rcp(1), rfiod(1) AUTHOR
LCG Grid Deployment Team LCG
$Date: 2005/03/31 13:13:01 $ RFCP(1)
All times are GMT -4. The time now is 11:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy