10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
#!/bin/bash
#
name=$1
type=$2
number=1
for file in ./**
do
if
then
filenumber=00$number
elif
then
filenumber=0$number
fi
tempname="$name""$filenumber"."$type"
if (4 Replies)
Discussion started by: TheGreatGizmo
4 Replies
2. Shell Programming and Scripting
Hello all
I have a data base of information that is formatted like so:
JSD4863 XXX-XX-XXXX DOE, JOHN C JR-II BISS CPSC BS INFO TECH 412/779-9445
I need the last four digits of the phone number. However, many lines contain
'garbage data' that I'm not interested in. So i used a 'for loop'... (7 Replies)
Discussion started by: smartSometimes
7 Replies
3. Shell Programming and Scripting
Dear friends,
I am working with two files named g1.txt and g2.txt....g1.txt is my main file in which it contains following data
#per_no permissionname permission command
1|HideCDrive, | : REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v... (1 Reply)
Discussion started by: jalpasoni
1 Replies
4. Shell Programming and Scripting
I have 1000's of directories which is named as numbers. Each directory contains multiple files. Each of these directories have a file named "att". I need to rename all the att files by adding the directory name followed by "_" then att for each of the directories.
Directories
120
att... (2 Replies)
Discussion started by: Lucky Ali
2 Replies
5. Shell Programming and Scripting
Hey everybody, I have a script for making a string substitution in a file. I am trying to modify it in order to make the same modifcation to multiples files. here is what I have so far.
#!/bin/csh
set p1="$1"
shift
set p2="$1"
shift
foreach x ($*)
if ( { grep -w -c "$p1" $x } ) then
mv... (7 Replies)
Discussion started by: iwatk003
7 Replies
6. Shell Programming and Scripting
Hi,
I have gone through the other related post but are of no help for me
I am sending multiple files as attachement.
The first file comes fine as an attachement but the other files are coming as binary.
For people with older version of email software they can see all attachements but... (1 Reply)
Discussion started by: pinnacle
1 Replies
7. Shell Programming and Scripting
hey guys,
I'm trying to call and modify multiple files inside the for loop, i can't get it to work...
------------------------
AFILE=/dir/a_file.txt
BFILE=/dir/b_file.txt
CFILE=/dir/c_file.txt
ADESTFILE=/dir/a_dest_file.txt
BDESTFILE=/dir/b_dest_file.txt... (6 Replies)
Discussion started by: DeuceLee
6 Replies
8. UNIX for Dummies Questions & Answers
Hi there,
I have a folder full of pdf's and I've run a compression on the to reduce the size, the output of the compress places a '-o' in the name of the file.
Before 12345.pdf
After 12345-o.pdf
Now I've got around 50000 files that I need to change back to the previous name, is... (3 Replies)
Discussion started by: KeesH
3 Replies
9. UNIX for Dummies Questions & Answers
hi all,
i was given by my supervisor a task to search for scripts which contain oracle sqlplus i.e "myusername/mypasswd @myDB" in every /home/userfolder, which are, all the scripts made by different user. I've done some find command to search string for sqlplus, but it may up too long to respond.... (8 Replies)
Discussion started by: Helmi
8 Replies
10. UNIX for Dummies Questions & Answers
I am trying to edit multiple files from one directory and including all the files in all the sub directories. My string opens each file, puts the text on my screen and does not save the new information to the file. I am using a variable in my script, and wondering if that is what is choking it. ... (1 Reply)
Discussion started by: Skoshi
1 Replies