10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi, I have about 60 files in a directory and need to rename those files. For example the file names are
i_can_phone_yymmdd.txt (where yymmdd is the date. i.e 170420 etc)
i_usa_phone_1_yymmdd.txt
i_eng_phone_4_yymmdd.txt
The new file names should be
phone.txt
phone_1.txt
phone_4.txt
I am... (4 Replies)
Discussion started by: naveed
4 Replies
2. SCO
I am downloading a zip file that contain files that are very long. I am trying to process them, but cannot. I can move the files from one directory to another at the shell prompt, but not within a shell script, I get a stat error.
The files look somewhat like this;
... (5 Replies)
Discussion started by: trolley
5 Replies
3. Shell Programming and Scripting
Hi Team,
I'm new to Unix shell scripting .
I've the following requirement
A folder contains the list of files with the following format
ab.name.11.first
ab.name.12.second
ab.name.13.third
----------
I have to rename the above file to like below
... (6 Replies)
Discussion started by: smile689
6 Replies
4. Shell Programming and Scripting
Hi there,
Firstly, I have no experience with shell scripts so would really appreciate some help.
I have the following shell script that is causing some problems:
moveit()
{
&& set -x
if
then
DOUBLE_DELIVERY=$(grep... (6 Replies)
Discussion started by: thebeno
6 Replies
5. UNIX for Dummies Questions & Answers
Hi Guys,
I have a small problem of renaming multiple files. For example I have names of a set of files in one directory like
K2_34625-34675
K7_988963-988983
K12_773882-7734102
and the other set corresponding to the same is
U_P_321_9_3_11.ab1
U_P_322_9_3_11.ab1
U_P_323_9_3_11.ab1
Now... (23 Replies)
Discussion started by: pawannoel
23 Replies
6. Shell Programming and Scripting
I have 7 files with 7 different names coming into a specified folder on weekly basis, i need to pick a file one after another and load into oracle table using sql loader. I am using ksh to do this. So in the process if the file has error records and if sql loader fails to load into oracle tables,... (2 Replies)
Discussion started by: vpv0002
2 Replies
7. Shell Programming and Scripting
I have to rename a large number of files so that the name of each file corresponds to a code number that is given side by side in a list (textfile).
The list contains in column A the filename of the actual files to be renamed and in column B the name (a client code, 9 digits) that has to be... (7 Replies)
Discussion started by: netfreighter
7 Replies
8. Shell Programming and Scripting
hi i wrote following script,
#!/usr/bin/sh
for index in `ls /tmp/common/*.txt`
do
echo "$index"
done
here index is giving full path but in my program i want only file names (not along with whole path)
Eg. if in /tmp/common files are a.txt and b.txt den out should be a.txt b.txt
... (6 Replies)
Discussion started by: crackthehit007
6 Replies
9. Shell Programming and Scripting
Hi,
What's the best way to find all files under a directory - including ones with space - in order to apply a command to each of them. For instance I want get a list of files under a directory and generate a checksum for each file.
Here's the csh script:
#!/bin/csh
set files = `find $1... (5 Replies)
Discussion started by: same1290
5 Replies
10. Shell Programming and Scripting
Hi
How can i dynamically read files names from a list file and execute them from a single shell script.
Please help its urgent
Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies