10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies
2. UNIX for Dummies Questions & Answers
Hi
I remember i have create a file "Dechistory" before a month. But i dont remember exact location.
I know i need to find out first that fiiles exact location for renaming it .......but i waant to that without going on that location.......how to do that ??? (1 Reply)
Discussion started by: tusharjoshi
1 Replies
3. Shell Programming and Scripting
Can someone please help. Much appreciated!!
I have 4 directories, for ex...
/RUN1/ReportTable.nxt
/RUN2/ReportTable.nxt
/RUN3/ReportTable.nxt
/RUN4/ReportTable.nxt
I would like to write a for loop, to add the directory name to each ReportTable.nxt
I would like for it to be:
... (5 Replies)
Discussion started by: dirttysoufff
5 Replies
4. Red Hat
Hi All;
I have a to rename a user account example User1 to User2 keeping everything same.
Now I would be using
usermod -l User1 User2 .However User1 has some cron jobs and by using the conventional usermod iam unable to transfer those cron jobs to User2 i.e after renaming the user.
... (4 Replies)
Discussion started by: maverick_here
4 Replies
5. Shell Programming and Scripting
I am trying to perform some validations on the source files. the script has file name pattern as an argument.The Input file has Single quotes in the filename . I want to remove those single quotes and split the file into 2 parts. below is my code
FILE_NAME=$1
if
then
echo "\n Files are... (5 Replies)
Discussion started by: dsshishya
5 Replies
6. UNIX for Dummies Questions & Answers
Hi, I wrote a script to rename all files in a directory from uppercase to lowercase and changing spaces to underscores:
#!/bin/sh
echo "rename"
read pathname
cd $pathname
for f in `ls "$pathname"` ; # listing directory for all files
do
echo... (1 Reply)
Discussion started by: the.noob
1 Replies
7. Shell Programming and Scripting
I want to rename the files by taking part of the file and appending date to it. please help
e.g.
abc-390.csv
xyz-908.csv
desired format is abc_YYYYMMDD.csv
This is what I have but it is not working
for each in *.csv;
do
mv $each /abc/data/"`date '+test_%Y%M%M'`".csv
done (2 Replies)
Discussion started by: mqasim
2 Replies
8. Shell Programming and Scripting
Hi,
I have a shell scripting. This will take 7 digit number in each line and add 7 digit number with next subsequent lines ( normal addition ).
Eg:
0000001
0000220
0001235
0000022
0000023
...........
.........
........
Like this i am having around 1500000 records. After adding... (23 Replies)
Discussion started by: thambi
23 Replies
9. Shell Programming and Scripting
Renaming Files more than 1000 in Diffrent Directories in system..
help me in this issue to resolve.... (5 Replies)
Discussion started by: sunsap
5 Replies
10. Shell Programming and Scripting
Hello.
Need to rename 1000's of files with names like 991%20(2003)%20-%20991%20Ryall%20Prison%20Population%20and%20Recorded%20Crime.doc
All I need is the beginning numbers , in this case 991 .
Tried: for file in * ; do mv $file `echo $file | sed '/^{p;q}'` ; done
but no luck.
Thank... (8 Replies)
Discussion started by: whatsup
8 Replies