Script to extract all deb files in a fldr to respective folderstructures
Hi, since half an hour I currently try to write a script that will:
1) Extract every debian file in a directory
2) Extracts it to a folder that matches the debians filename
3) Extracts it so the structure looks like that:
to achieve this I used that:
however this doesn't:
- extract multiple debians
- only works with one debian a time
- doesn't create folders that match the previous debian filename
I would need it to read the filename of each debian as a variable, then feeding it into the script instead of DEBIANFILENAME, afterwards delete the just extracted .deb file.
I can't figure out how to do it... I tried different approaches, like
but most likley just don't get it.
I want to make a config file which contain all the paths.
i want to read the config file line by line and pass as an argument on my below function.
Replace all the path with reading config path line by line and pass in respective functions.
how can i achieve that?
Kindly guide.
... (6 Replies)
Hi Team,
I got a requirement to send a mail to the individual users of a unix server about their respective groups. can some one help me to provide the script as I am unable to write that.
I tried with below lines but I come out with errors.
cat /etc/passwd | awk -F':' '{ print $1}' |... (6 Replies)
Hi Guys,
I need to copy the files to respective directories based on name of the file. My script is something like below
con=$1
for file in `cat $con`
do
file_tmp=$(ls -t1 $path| grep -i $file | head -n 1)
echo $file_tmp
if
then
cp $path$file_tmp $DIR/ap
if
then... (16 Replies)
Greetings!
Here's one which has been bugging me for a bit ;)
As might be known, LibreOffice is available to some of us Linux folk as a large set of debs. Of course, being a curious sort, I'd like to dig in and recreate the original tree which is composed of these assorted archives.
So, I... (1 Reply)
I have two files : Alpha and Beta.
The files are as follows (without arrow marks.)
Alpha:
A 1
D 90
G 11
B 24
C 15
Beta:
B 24
C 0 <--
G 11
D 20 <--
A 4 <--
E 777 <--
Expected output of the script :
Alpha: (2 Replies)
Hi,
I am new to shell scripting.Please help me on this.I am using solaris 10 OS and shell i am using is
# echo $0
-sh
My requirement is i have source file say makefile.I need to extract files with extensions (.c |.cxx |.h |.hxx |.sc) from the makefile.after doing so i need to check whether... (13 Replies)
I have a number of files in directories labeled like this:
/Data/tr_gray/tr_DTI/dti_FA.nii.gz
(the brackets here represent a range of number that the files are labeled with)
I need to rename each dti_FA.nii.gz file according to the name of the folder it resides in. For example, the file ... (3 Replies)
Hey guys,
I need to know how to locate all .htaccess files on the server and make a backup of them in the folder they reside before I run a script to modify all of them.
So basically taking dir1/.htaccess and copying it as dir1/.htaccess_bk
dir2/.htaccess copying as dir2/.htaccess_bk... (5 Replies)
Hello forum members,
I have to create a out file in the current path./aaa/bbb/ccc/hhh.
i am writing script below.
###script Begins#####
#!/bin/ksh
echo "Weclome"
if
then
echo "Hello"
rm -rf $aaa/bbb/ccc/hhh #clean the exsisting o/p file
echo "no... (2 Replies)
Hello,
I have files like this
img.txt
./Rearrange_zoca/fitted_data/WX226_05b_Ncere.jpg
./Rearrange_zoca/fitted_data/w322_03B_60_70.jpg
./Rearrange_zoca/fitted_data/wrx226_12A_50_60.jpg
./Rearrange_zoca/fitted_data/wx124_01A_50_60.jpg
./Rearrange_zoca/fitted_data/wx124_02A_50_60.jpg... (3 Replies)