Summary: I like to rename a file based on the first line. Here is an example of what I need to do. File: 034568.dat has 2000 lines with first line as HIOSPAD23...
Summary: Does anyone have a script that will allow me to take the contents of a directory and delete files based on their age? Here's the scenerio. I have a d...
Summary: Hi to Samer, I have the same need but the scenario is i'm going to rename a file based on the subdirectory's name. I am using asterisk with voicemail ...
Summary: I have a UNIX box where in files are created every a5 minutes. I need to write a shell script which will take in the date as parameter and return me a...
Summary: I need to create a script that will remove a file if there is no extension. The file is generated with a random name, based on current date. The file...
Summary: Hi All, Im trying to write a script to archive files based on the date the files were created. For example, if a group of files were created on 23rd A...
Summary: The script is not dependent on the content of /tmp/timestamp. The touch command will either create an empty file or update the timestamp of a file bas...
Summary: I want the script to calculate a date in the past, say 7 days, and then delete certain files based on that date. My problem is that I don't know how ...
Summary: Hi , we have a standby database and everyday in the night at 1 a.m we have to ftp the archive log files from the production server to the standby serv...
Summary: I think you want to use the csplit command which splits a file based on regular expressions. Take a look at these links: http://www.computing.net/uni...
Summary: I am in a situation wherein i need to rename all files in a directory by suffixing it with current timestamp and delete all files 1 week older.Can any...
Summary: Out of nowhere, I suddenly need to rename a file with the current date and time automatically appended e.g. the script should prompt you for a filenam...
Summary: I'm trying to remove a specific line from a file based on a user defined input. I had found a similar situation where sed was used, but when I tri...
Summary: Greetings, I need to extract a file based on a control file that I am reading and create an output file. My control file has 3 char and rows may look...
Summary: Hello UNIX Guru's, I'm in need of your valuable help regarding the issues i'm having. Brief Description: ------------------- I have put together a lit...
Summary: I don't think you are understanding csplit's purpose & syntax. csplit splits a file based on a regular expression. Here is an example: csplit -ks -f ...
Summary: Hi, I too am a 'newbie' at scripting. This is a problem that I have been stuck on for a while. I have a script that is creating files from another...
Summary: Hello I have a shell script that runs 5 times a day and ftps to a remote server...i only want it to ftp if $FILE exists on the remote server...here is...
Summary: Hi All, Could someone tell me whats wrong with this script? The script should read a file(the file contains path of files to archive),and then tar the...
Summary: I need a little help with a Script. I need to read a filename from a directorty based on a specific format. I will be looking for the file in a direct...
Summary: I'm trying to rename a file from gjoob.txt to gjoob_monday.txt depending on the day of the week. I can get the current day of the month by typing `dat...
Summary: Hi, If anybody could help me with this one I would really appreciate it. I am supposed to write a script that sends a file (using mailx), that I creat...
Summary: Hi, I want to replace few characters based on position. For example, I have the following string: 202204051121010000033333301000086963000000000000000...