Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Script for renaming multiple scripts Post 302849389 by orangepeel on Sunday 1st of September 2013 05:55:26 AM
Old 09-01-2013
Many thanks for your replies

I have tried "spacebars" script however it is giving out the following error:

Quote:
cp: cannot stat `/home/irlp/webstuff//home/irlp/webstuff/setMonDate': No such file or directory
1 : Error occured coping /home/irlp/webstuff//home/irlp/webstuff/setMonDate to /home/irlp/webstuff/trial//home/irlp/webstuff/setMonDate.txt
I have set the following parameters:
Code:
SOURCE_DIR="/home/irlp/webstuff"
TARGET_DIR="/home/irlp/webstuff/trial"

It appears that the script is not copying the files over and appending the .txt extension on the newly copied files into the target directory

Am I on the right path with this or something astray?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sh script to run multiple php scripts

I wrote a .sh script to run 5 php scripts. The problem is that it's running 1 then 2 then 3 in that order .... I want it to execute all 5 at ONCE.... nohup php /home/script1/script1.php && nohup php /home/script2/script2.php && nohup php /home/script3/script3.php && nohup php... (1 Reply)
Discussion started by: holyearth
1 Replies

2. UNIX for Dummies Questions & Answers

Script Problem-Processing multiple scripts

Hi All, I have four scripts to run. My 1st script will make script2 and script3 to run. I am setting a cron job for this script1 to run continuously. This script1 will check for 2 text files and based on the existance of those text files it will initiate the script2 and script3. Now my doubt... (2 Replies)
Discussion started by: RSC1985
2 Replies

3. Shell Programming and Scripting

Renaming multiple files with a shell script

Hey guys, I'm really new to UNIX and shell scripting in general. For my internship I need to rename a bunch of files. Specifically, I need to change the first letter of each of the files to lowercase and I have to change the endings so they all basically look like "file_cone.jpg". I know I... (4 Replies)
Discussion started by: jjzieve
4 Replies

4. Shell Programming and Scripting

Script to execute multiple scripts

Hi All, I have 4 scripts to execute. Each one take anywhere from 3 -9 hours to run depending on what it's doing. I'm running one at a time then check back periodically to see if it's still going and if not, run the other. How can I put these scripts into another script so that they are... (5 Replies)
Discussion started by: bbbngowc
5 Replies

5. Shell Programming and Scripting

Local script to trigger multiple remote scripts

Hi All, I am facing problem running a script which triggers another script in multiple remote servers. my script in my local server looks like below ssh server1 "sudo -u uname /usr/local/script/start.sh &2>&1 >/dev/null " ssh server2 "sudo -u uname /usr/local/script/start.sh &2>&1 >/dev/null "... (7 Replies)
Discussion started by: sain
7 Replies

6. Shell Programming and Scripting

Multiple shell scripts executed in one script

Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only.. it... (1 Reply)
Discussion started by: Madhu Siddula
1 Replies

7. Shell Programming and Scripting

Multiple shell scripts executed in one script

Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only.. it... (6 Replies)
Discussion started by: Madhu Siddula
6 Replies

8. UNIX for Beginners Questions & Answers

A single script to run multiple scripts

Hi , Can someone help! I need a shell script to run multiple scripts by using single shell script, incase any one of the scripts fails, it should get exit and after trouble shooting if we re-execute it, it should start from the failed script. I have a written a scripting till the... (1 Reply)
Discussion started by: anniesurolyn
1 Replies

9. Shell Programming and Scripting

Multiple scripts in one single script - crontab

Hello all, Hope all's well. i'm not sure if this is possible but i have some scripts running in a crontab with different intervals, 1min, 5 min, etc. As for a "cleaner" and better control of these scripts (as by time we will have hundred's of scripts used for the same purpose, i.e for Nagios... (4 Replies)
Discussion started by: nms
4 Replies

10. Shell Programming and Scripting

Script calling multiple scripts (using lock file)

Hi all, i have compiled a script as below. Basically this script is intended to call 3 other scripts, which i intend to run simultaneously. #!/usr/bin/bash HOMEDIR=/path/of/home LOCKDIR=$HOMEDIR/lock #check for LOCK LOCKFILE=$LOCKDIR/$(basename $0 .sh).lock if ; then echo... (2 Replies)
Discussion started by: nms
2 Replies
SPLIT(1)							   User Commands							  SPLIT(1)

NAME
split - split a file into pieces SYNOPSIS
split [OPTION]... [INPUT [PREFIX]] DESCRIPTION
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is `x'. With no INPUT, or when INPUT is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -a, --suffix-length=N use suffixes of length N (default 2) -b, --bytes=SIZE put SIZE bytes per output file -C, --line-bytes=SIZE put at most SIZE bytes of lines per output file -d, --numeric-suffixes use numeric suffixes instead of alphabetic -l, --lines=NUMBER put NUMBER lines per output file --verbose print a diagnostic just before each output file is opened --help display this help and exit --version output version information and exit SIZE may be (or may be an integer optionally followed by) one of following: KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y. AUTHOR
Written by Torbjorn Granlund and Richard M. Stallman. REPORTING BUGS
Report split bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report split translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for split is maintained as a Texinfo manual. If the info and split programs are properly installed at your site, the command info coreutils 'split invocation' should give you access to the complete manual. GNU coreutils 8.5 February 2011 SPLIT(1)
All times are GMT -4. The time now is 04:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy