06-06-2013
Thanks for your reply, and for the hint on the use of $. I used the code you suggested, but what is doing is to get the first line that says "Generated ..." from inputfile, then pastes the content of Xfile0001, and then it prints the last line of Xfile0001 'ad infinitum' until I disk quota is exceeded, and doesn't print the next line from inputfile saying "Generated..." followed by Xfile0002, and so on. Thanks!
I tried adding a next statement, but doestn't work. Thanks for your advice.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
In a while loop, like below...
while read line
do
read choice
case $choice in
1)
echo "xxx"
esac
done < file
why I can't run the read choice???? (3 Replies)
Discussion started by: dta4316
3 Replies
2. Shell Programming and Scripting
Hi all
Does anyone have a script that will allow me to stop inside a while read loop.
I want to pause the loop until a enter is pressed.
e.g.
While read line
do
echo something
if LINECOUNT > 40
then
read ENTER?"PRESS ENTER TO CONT..."
... (3 Replies)
Discussion started by: jhansrod
3 Replies
3. Shell Programming and Scripting
Hi,
'read' command is not working inside the while loop, How can I solve this?
Rgds,
Sharif. (2 Replies)
Discussion started by: sharif
2 Replies
4. Shell Programming and Scripting
Im want to print filename inside loop .. the code im using :-
Filename_1=abc_20090623_2.csv.lk
Filename_2=def_20090623_2.csv.lk
i want to extract filename till .csv eg
Filename_1=abc_20090623_2
Filename_2=def_20090623_2
How can i do this inside the for loop
... (3 Replies)
Discussion started by: r_t_1601
3 Replies
5. Shell Programming and Scripting
Hi,
I have 100 files in a directory.
Each file have the following format
>CtbRe01234
fdfjdhfkdfkd
>CtL2B0456
gjfgfkgjfkgjfk
>CmdrE05768
fghdjskksllfkLike this I have many files in the directory.
What I want is; rename the header content in each file such that the above file... (6 Replies)
Discussion started by: Lucky Ali
6 Replies
6. Shell Programming and Scripting
AT
----------
0
Elapsed: 00:00:00.02
SO
----------
0
Elapsed: 00:00:00.01
SE
----------
0
Elapsed: 00:00:00.01
CR
---------- (4 Replies)
Discussion started by: sandy1028
4 Replies
7. Shell Programming and Scripting
Hi,
Need help in writing a script to read the contents of this file test
Test
00a
00b
00c
00d
00e
00f
where it need to read each line to give a display such as
form meta from dev 00a , config=Striped; add dev 00b:00f to meta 00a
Can any one help me in writing this script (2 Replies)
Discussion started by: praveen1516
2 Replies
8. Shell Programming and Scripting
Hi,
I am reading file records inside a while loop,
and want to update the record when certain condition is met.
How can I update a file while being read?
I want to avoid using temporary files, copy, rename, ...
while IFS=',' read -r f1 f2
do
function(f1,f2)
if
then
<add... (1 Reply)
Discussion started by: ysrini
1 Replies
9. Shell Programming and Scripting
I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix.
I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice.
Files:... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
10. Shell Programming and Scripting
Hi,
This query is a part of a much more lengthy script.
I wish to look for all the files in a folder named "data" which in this case has two files i.e. plan.war and agent.properties. For all the files found under data I wish to ask the user as to where they wish copy the files to.
Below,... (14 Replies)
Discussion started by: mohtashims
14 Replies
LEARN ABOUT XFREE86
licensecheck
LICENSECHECK(1) LICENSECHECK(1)
NAME
licensecheck - simple license checker for source files
SYNOPSIS
licensecheck --help|--version
licensecheck [--no-conf] [--verbose] [--copyright] [-l|--lines=N] [-i|--ignore=regex] [-c|--check=regex] [-m|--machine] [-r|--recursive]
list of files and directories to check
DESCRIPTION
licensecheck attempts to determine the license that applies to each file passed to it, by searching the start of the file for text
belonging to various licenses.
If any of the arguments passed are directories, licensecheck will add the files contained within to the list of files to process.
OPTIONS
--verbose, --no-verbose
Specify whether to output the text being processed from each file before the corresponding license information.
Default is to be quiet.
-l=N, --lines=N
Specify the number of lines of each file's header which should be parsed for license information. (Default is 60).
-i=regex, --ignore=regex
When processing the list of files and directories, the regular expression specified by this option will be used to indicate those which
should not be considered (e.g. backup files, VCS metadata).
-r, --recursive
Specify that the contents of directories should be added recursively.
-c=regex, --check=regex
Specify a pattern against which filenames will be matched in order to decide which files to check the license of.
The default includes common source files.
--copyright
Also display copyright text found within the file
-m, --machine
Display the information in a machine readable way, i.e. in the form <file><tab><license>[<tab><copyright>] so that it can be easily
sorted and/or filtered, e.g. with the awk and sort commands. Note that using the --verbose option will kill the readability.
--no-conf, --noconf
Do not read any configuration files. This can only be used as the first option given on the command-line.
CONFIGURATION VARIABLES
The two configuration files /etc/devscripts.conf and ~/.devscripts are sourced by a shell in that order to set configuration variables.
Command line options can be used to override configuration file settings. Environment variable settings are ignored for this purpose. The
currently recognised variables are:
LICENSECHECK_VERBOSE
If this is set to yes, then it is the same as the --verbose command line parameter being used. The default is no.
LICENSECHECK_PARSELINES
If this is set to a positive number then the specified number of lines at the start of each file will be read whilst attempting to
determine the license(s) in use. This is equivalent to the --lines command line option.
LICENSE
This code is copyright by Adam D. Barratt <adam@adam-barratt.org.uk>, all rights reserved; based on a script of the same name from the KDE
SDK, which is copyright by <dfaure@kde.org>. This program comes with ABSOLUTELY NO WARRANTY. You are free to redistribute this code under
the terms of the GNU General Public License, version 2 or later.
AUTHOR
Adam D. Barratt <adam@adam-barratt.org.uk>
Debian Utilities 2013-12-23 LICENSECHECK(1)