10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Requirement is to list the files older than 365 days from multiple directories and delete them and log the list of files which are deleted to a log file.
so 1 script should only list files older than 365 days for each directory separately to a folder
The other script should read these files... (7 Replies)
Discussion started by: prasadn
2. UNIX for Dummies Questions & Answers
I need a UNIX ksh script that counts the number of files in directory, if the files exceed 20 files, then email results. I want the script to run every hour.. I don't have access to cron.. I'm some what new to UNIX. Windows guy all my career.. this is what I have so far..
... (5 Replies)
Discussion started by: PerlHaven2k
3. UNIX for Advanced & Expert Users
I'm quite new to ksh scripting, can someone help me with this.
I need to create a script that list the files from a user input date range.
e. g. format of file:
*c1*log.2012-12-22-14-00*... (1 Reply)
Discussion started by: chococrunch6
4. Shell Programming and Scripting
can anyone suggest me on the below:
how to write a shell script to search and delete files on windows server.
-script runs on unix box
-it should search for specific files on windows server and delete them periodically. (2 Replies)
Discussion started by: chpradeepch
5. Shell Programming and Scripting
Sorry for this basic request. But I just started learning Ksh recently and still I am a newbie in this field.
Q: I have files on one server and the date format is 20121001000009_224625.in which has year (yyyy) month (mm) and date (dd). I have these files on server A. The task... (8 Replies)
Discussion started by: BrownBob
6. Shell Programming and Scripting
Let me know how can i find and delete files from one unix server to another unix server which are 'N' days older.
Please note that I need to delete files on remote unix server.So, probably i will need to use sftp, but question is how can i identify files and folders which are 'N'... (2 Replies)
Discussion started by: sachinkl
7. Shell Programming and Scripting
Can anybody please help me on how to code for the below requirement:
I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
8. Shell Programming and Scripting
script for to take files from FTP server to UNIX server and Unzipped that files (1 Reply)
Discussion started by: sunilamarnadh
9. Shell Programming and Scripting
Does anyone know of a utility or a script for renaming files on a UNIX web server? I've seen several of these types of renaming utilities for Windows, but none for UNIX. I have 10,000 files that I need to rename in a several tier (deep) web site directory. I have the original... (2 Replies)
Discussion started by: everettr
10. Shell Programming and Scripting
can anyone help me in writing script in UNIX for copying files in two server from the third server after checking the files in the third server and if there is anything new in the third server automatically it should be added to the rest of the two servers and if same file is existing in the two... (4 Replies)
Discussion started by: REKHA09
shift(1) User Commands shift(1)
shift - shell built-in function to traverse either a shell's argument list or a list of field-separated words
* shift [n]
The positional parameters from $n+1 ... are renamed $1 ... . If n is not given, it is assumed to be 1.
The components of argv, or variable, if supplied, are shifted to the left, discarding the first component. It is an error for the variable
not to be set or to have a null value.
The positional parameters from $n+1 $n+1 ... are renamed $1 ..., default n is 1. The parameter n can be any arithmetic expression that
evaluates to a non-negative number less than or equal to $#.
On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways:
1. Variable assignment lists preceding the command remain in effect when the command completes.
2. I/O redirections are processed after variable assignments.
3. Errors cause a script that contains them to abort.
4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari-
able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not
See attributes(5) for descriptions of the following attributes:
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|Availability |SUNWcsu |
csh(1), ksh(1), sh(1), attributes(5)
SunOS 5.10 15 Apr 1994 shift(1)