Microsoft
Software
Hardware
Network
Question : How to write a shell script to untar files?
I'd like to write a shell script that untars files within a directory.
I tried the code below, but get an "unexpected token" error.
Code Snippet:
1: 2: 3: 4:
#!/bin/bash file=ls ./*.tar.gz do tar -xvzf $file done
Open in New Window
Select All
Answer : How to write a shell script to untar files?
try
#!/bin/bash
for file in *.tar.gz
do
tar -xvzf $file
done
Random Solutions
Word crashes randomly when trying to print labels
How to create Batch File to Add Entires to Host File?
Windows has blocked access to these files to help to protect your computer ...
Add trusted site to GPO
Microsoft Vista root directory access.
script to load excel sheet into a table of sqlserver database using a job
Bold, Underline and array
Outlook 2007 crashes!!!
How To Set Up an Internal Blog?
Help creating small shell script to manipulate text file data.