Search Results

Search: Posts Made By: devs
2,665
Posted By devs
Jacoden, thanks I can use this. I checked... I...
Jacoden, thanks I can use this. I checked... I think multiple files are not there.
2,665
Posted By devs
I have multiple files in the gz file... I guess...
I have multiple files in the gz file... I guess this may work foronly if the gz has single file.

Thanks for the reply.
2,665
Posted By devs
gunzip question
unzip test.zip ==> This uncompresses and keeps the original zip file.

gunzip test.gz ==> Removes the .gz file after uncompressing.
Is there any switch to make the .gz file available after...
5,376
Posted By devs
Somebody suggested in one of the messages and...
Somebody suggested in one of the messages and with that, could make it like this:

suffix=${filename##*.}

if [ $suffix = "jpg" || $suffix = "gif" ]; then
-- do something
fi
5,376
Posted By devs
basics - if condition (contains)
Can any body help me on how to check whether a file contains a required extension or not.

pseudo is:

if (filename contains .jpg || filename contains .gif)
--- do some thing
end if

Example...
15,339
Posted By devs
Got it. Thank you all.
Got it. Thank you all.
15,339
Posted By devs
filename extension check - regular expression
How to compare the file name for "zip" or "ZIP" extension.

I can put one more || condition to check the upper case in the below:
if [[ "`echo ${fileName} | cut -d'.' -f2`" = "zip" ]]; then

Is...
5,331
Posted By devs
thank you very much for the quick responses... my...
thank you very much for the quick responses... my prob solved.
finally ended up using
gzcat fnam.tar.gz | tar xf -
5,331
Posted By devs
Retaining tar.gz after gunzip
gunzip fnam.tar.gz
After this command execution... .gz file no longer exists... and only fnam.tar is present.

Is it possible to retain the tar.gz file after after using the above command

thx...
48,715
Posted By devs
thank you all.. it was helpful
thank you all.. it was helpful
48,715
Posted By devs
Thanks for the replies. can this regular...
Thanks for the replies.

can this regular expression be made possible to use for both filename.gz & filename.tar.gz

I want to get filename for both of these commands as just filename only:
echo...
48,715
Posted By devs
Stripping out extension in file name
This command gives me just the filename without any extension:
evrvar =`echo filename.tar | sed 's/\.[^.]*$//'`

I am trying to make a change to this command... to make it work for......
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 10:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy