Sponsored Content
Full Discussion: for loop not working
Top Forums UNIX for Dummies Questions & Answers for loop not working Post 302588673 by jim mcnamara on Monday 9th of January 2012 04:23:13 PM
Old 01-09-2012
Code:
for INCI in 1 2 3 4 5 6 7 8 9 10
do
tar -xvf Update_${INCI}11.10.002_x86_${INCI}of10.tar
done

try that.
This User Gave Thanks to jim mcnamara For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Loop not working

Apologize if this is doesn't come under this group. I have a small script to find out users who last logged in to check there mail. (Tru 64 4.0, Netscape mail 3.6) -----> cat $1|awk -F: '$2=="SMTP-Accept" && $5~/@maildomain/ {s=$5;u++;las=substr($1)} END {for (i in u) {print... (2 Replies)
Discussion started by: nitin
2 Replies

2. Shell Programming and Scripting

if loop is not working

Hello i am trying to remove a line using an input file , but this depends upon user interaction here is the sample #!/bin/sh echo "Please enter whether you want to remove Profile" read value1 if ;then sed /movie/d temp.txt> temp3.txt else echo "Script didnot remove profile" fi ... (3 Replies)
Discussion started by: ranga27
3 Replies

3. Shell Programming and Scripting

For loop not working...! :(

Could some one help me on this... For loop is working...! for x in $i do for y in $j do z=`echo $y | awk '{print $2}'` if then FS=`/usr/bin/echo $y` echo $FS >>$Basic_location/out.csv fi done CPRT="Cpoyright @ BTOIDCIM" done (3 Replies)
Discussion started by: bullz26
3 Replies

4. UNIX for Dummies Questions & Answers

If then else loop not working

If then else segment of below code is not working. For each filename code is displaying output for if part as well as else part. Please help its urgent. for usercusttop in `echo ${filename}|sort|uniq|cut -c 1-${actualwordcount}` do ... (2 Replies)
Discussion started by: findprakash
2 Replies

5. UNIX for Advanced & Expert Users

If loop is not working

The following piece of code is not running because it is fails to go inside the if condition. i want to create a directory if there is no directory in the input path. i am using Linux, by CENT. Please help. echo " Enter the path where you u want to extract the tar" read EXTRACT_PATH ls -ld... (12 Replies)
Discussion started by: toanilsharma1
12 Replies

6. Shell Programming and Scripting

While loop not working

here we go.. While loop is not working file.. It also invokes one more shell scripts for which parameters need to passed on. while read line do #### #### We want to have a logfile for each load #### PLog="${LogDir}/${Script}.log"; #### ... (5 Replies)
Discussion started by: premkumardr
5 Replies

7. Shell Programming and Scripting

while loop not working

hi everyone i am facing a very strange problem . please help me why my while loop is not working. below is my code #!/bin/ksh file=RCMC_ABC_999_080924_210813.DAR echo ${file} value=001 count=10 echo "abc" echo ${count} value=$((${value} + 1 )) echo ${value} while ] do echo... (3 Replies)
Discussion started by: aishsimplesweet
3 Replies

8. Shell Programming and Scripting

For loop not working

Hi All, For loop in ksh not working if it was given in the following method. simple script: for i in {1..4} do echo $i done Output: {1..4} Even below also not working :( Script: for (( c=1; c<=5; c++ )) do echo "Welcome $c times..." done Output: ./x.sh: 0403-057 Syntax error... (13 Replies)
Discussion started by: girish_satyam
13 Replies

9. Programming

C While Loop not working like C++

Hi new to C give me a hand thank. do { bzero(input,256); printf("Please enter the country name!"); scanf("%s",input); //& character is essential for scanf(), %f = float, %399s as the last character to be the null character ('\0'). } while... (5 Replies)
Discussion started by: GQiang
5 Replies

10. Shell Programming and Scripting

For-loop not working

Hello all, I would like to unzip some files with a for-loop. Is there anyone who could tell me how I should do this - in a correct way? for file in $(ls); do echo gzip -d < $file | tar xf -; done The problem is the pipe - I believe. But how could I do it? I need it for the command... (4 Replies)
Discussion started by: API
4 Replies
BF_TAR(1)						    Bogofilter Reference Manual 						 BF_TAR(1)

NAME
bf_tar - shell script to write a tar file of a bogofilter directory to stdout SYNOPSIS
bf_tar [-r] [-R] bogofilter_directory DESCRIPTION
bf_tar bundles a bogofilter working directory in tar format and copies it to standard output (your console, or where you redirect it, see EXAMPLES below). OPTIONS
The -r option causes bf_tar to remove inactive log files after the archive has been written successfully. The default is to leave log files. The -R option causes bf_tar to remove inactive log files before the archive is written. This may reduce chances that the resulting archive is recoverable should it become damaged. The archive may be smaller though. The default is to leave log files. EXIT STATUS
The script exits with status code 0 if everything went well, and nonzero if it encountered trouble. EXAMPLES
o bf_tar ~/.bogofilter > outfile.tar Writes a standard .tar file containing the essential files from ~/.bogofilter to outfile.tar. o bf_tar ~/.bogofilter | gzip -9 -c > outfile.tar.gz Writes a gzipped .tar.gz file containing the essential files from ~/.bogofilter to outfile.tar.gz. o bf_tar `pwd`/mydirectory > outfile.tar Prepend $(pwd)/ or `pwd`/ if you want to specify an absolute path instead of a relative path. NOTES
This script is meant for use with Berkeley DB based bogofilter versions. This script requires a SUSv2 compliant pax utility. This script expects a SUSv2 compliant shell. Solaris systems should have the SUNWxcu4 package installed (when bogofilter is configured) so that /usr/xpg4/bin/sh can be used. AUTHORS
Matthias Andree Bogofilter 10/22/2012 BF_TAR(1)
All times are GMT -4. The time now is 12:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy