10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hii,
Could someone help me to append string to the starting of all the filenames inside a directory but it should exclude .zip files and subdirectories.
Eg.
file1: test1.log
file2: test2.log
file3 test.zip
After running the script
file1: string_test1.log
file2: string_test2.log
file3:... (4 Replies)
Discussion started by: Ravi Kishore
4 Replies
2. Shell Programming and Scripting
Hi frnds,
My requirement is I have a zip file with name say eg: test_ABC_UH_ccde2a_awdeaea_20150422.zip
within that there are subdirectories on each directory we again have .zip files and in that we have files like mama20150422.gz and so on.
Iam in need of a bash script so that it unzips... (0 Replies)
Discussion started by: Ravi Kishore
0 Replies
3. Shell Programming and Scripting
Hi All,
requirement is to find and remove the files from sub directories but it should exclude the files from parent directory.
At present i am using the below one but it finds and remove files from both parent and sub directories.
find ${PATH} -type f \( -name securitas\* -o -name \*gz... (1 Reply)
Discussion started by: Naveenkk
1 Replies
4. 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
5. Shell Programming and Scripting
Hi there,
Our current directory structure is set up as follows:
-2013-09-20
- 380134664407418202
- 76523.html
- 5331257754517660
- 76267.html
- 76268.html
- 76269.html
- 76270.html
- 76271.html
- 76272.html
- 76273.html
- 76274.html
-... (2 Replies)
Discussion started by: jimbojames
2 Replies
6. UNIX for Dummies Questions & Answers
Hi! I want to find files located in subdirectories. I have tried
ls -R | grep myfile
but this won't tell me where the file is, only that it is there.
Any one have a better idea?
Thanks,
--Euclid (3 Replies)
Discussion started by: euclid3628800
3 Replies
7. UNIX for Dummies Questions & Answers
If I execute the command "ls -l /export/home/abcde/dev/proj/code/* | awk -F' ' '{print $9}' | cut -d'/' -f6-8" it will list all the files in /export/home/abcde/dev/proj/code/ directory as well as the files in subdirectories also
proj/code/test.sh
proj/code/test1.c
proj/code/unix... (8 Replies)
Discussion started by: shyjuezy
8 Replies
8. UNIX for Dummies Questions & Answers
hello there
the problem i got: i need to list .rrd files in each sub-directory from the parent directory, then create .xml files for each rrd files, the xml file should be in the same subdirectoryas rrd file.
i have tried
ls |awk '{print... (3 Replies)
Discussion started by: binbintriangel
3 Replies
9. UNIX for Dummies Questions & Answers
From the main directory, I have multiple layers of subdirectories and imbedded files (jpg's) that I would like to have a quiklook. Is there a way of listing out the contents of all of the subdirectories and files with a one-line command?
Thx... (3 Replies)
Discussion started by: kuciauskas
3 Replies
10. Shell Programming and Scripting
i want to make a bash script that searches a specific pattern in files through all subdirectories beneath the current directory..without using the command grep-R
but only the command grep..
e.g
for i in *
do
grep "pattern" $i
.....
...
done
using the character (*) the script... (5 Replies)
Discussion started by: milagros
5 Replies