10-11-2013
That code is an absolute mess. It's almost as if you're trying to make it difficult for us to help. The very, very least you can do is use sane indentation.
I didn't scrutinize it, but two things stand out in your most recent post. (1) You are not piping
sort|tail|head into the while-loop. (2) You don't use $i anywhere (perhaps that's intentional).
On a general note, you have not made any effort to provide useful feedback for the suggestions given. Have you confirmed that the directory exists and that there are files in it, per post #5? If you can't be bothered to help us account for the error messages that you report (when you report them), how do you expect us to help you fix the problems?
Quote:
Originally Posted by
Manu1234567
I have changed but my file contains different things.....Any other suggestions?
I suggest you be specific instead of vague.
Regards,
Alister
This User Gave Thanks to alister For This Post:
10 More Discussions You Might Find Interesting
1. Solaris
Patching a Solaris 2.6 server (running application that wasn't approved for anything higher) in single user mode - loading about 120 patches.
Following error started occurring after patch 105356-23
/kernel//kernel/strmod/ptem: undefined symbol miocpullup ptem error doing common
Actual... (0 Replies)
Discussion started by: RTM
0 Replies
2. Solaris
I have a Sun Sparc machine with Solaris 9 on it. I changed one file system (also mount point) name from /home to /u01. Then I updated /etc/vfstab. After that, I did df -k, system told me that df: cannot statvfs /home: No such file or directory/.
Please tell me how and where to fix this error?... (2 Replies)
Discussion started by: duke0001
2 Replies
3. UNIX for Dummies Questions & Answers
I am getting a :; then
echo "Enter zero or one file"
echo "You must use a valid directory"
echo "Current directory is:" pwd
exit 0
fi
#Flag Variable
flag=1
#Code for no arguments
if ; then
for filename in *
do
if ; then
... (2 Replies)
Discussion started by: Brewer27
2 Replies
4. UNIX for Dummies Questions & Answers
For anyone have work in bash shell scripting before know the if and then statement
it work like this
if (condition); then
I have create a mini shell in C, and I want to make it a bit more tolerable than the normal bash shell where you do not need the ';' between if and then if they are in the... (2 Replies)
Discussion started by: snow2462
2 Replies
5. Shell Programming and Scripting
Pls help me with the below script.
Its returning an error No such file or Directory.
#!/bin/ksh
cd /enip/enipapp/cbp/AOC2511201
for file in `cat filename.txt | head -1 | tr -d '\r'`
do
for i in `cat '$file' | tr -d '\r'`
do
echo "-----script start `date`... (9 Replies)
Discussion started by: Naga06
9 Replies
6. AIX
Hi Team,
I am getting the following error when I do an errpt. What do I need to do to fix it.
LABEL: LVM_SA_STALEPP
IDENTIFIER: EAA3D429
Date/Time: Sat 12 Jan 01:10:56 2013
Sequence Number: 880
Machine Id: 00C57B904C00
Node Id: spg-lplaw-01... (1 Reply)
Discussion started by: ranjithm
1 Replies
7. Windows & DOS: Issues & Discussions
Hi,
I'm currently tinkering with a script that uses the for command to process all *.gif files in the current folder.
I marked the spot where it exits out with an error by adding a "pause"
The error message given is:
convert.exe: unable to open image `%x': No such file or directory @... (2 Replies)
Discussion started by: pasc
2 Replies
8. Shell Programming and Scripting
Hi Guys,
I`m having a strange problem with my data set. Whenever there is a transition to another value is col1, the corresponding 3rd col goes to the next line. This is a huge file, so need to fix in a script. The file is tab delimited.
Here is what is happening when transitioning from... (4 Replies)
Discussion started by: gina.lizar
4 Replies
9. HP-UX
Hi, I have a HP UX C8000 box , have installed 11.11i from 4 x cds numerous times to try to get a functioning Network or to try and get rid of this error on start up, after new install and 1st startup I get an error
"The desktop messaging system could not be started" and then advice about... (12 Replies)
Discussion started by: C8000
12 Replies
10. Shell Programming and Scripting
rsync --delay-updates -F --compress --archive --rsh='/usr/bin/ssh -t -a -x' /web/admin/Transfer/data/ user1@destserver1:/tmp/testf
rsync version on sender server is:3.0.9
rsync version on sender server is:3.0.6
Linux sourceserver1 3.10.0-693.17.1.el7.x86_64 #1 SMP Sun Jan 14 10:36:03 EST... (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT DEBIAN
lam-helpfile
LAM-HELPFILE(5) LAM FILE FORMATS LAM-HELPFILE(5)
NAME
lam-helpfile - LAM help message file
DESCRIPTION
The lam-helpfile provides detailed error messages and suggestions for help on how to fix common problems. In many places in LAM, when an
error occurs, this help file is consulted to display a detailed message of what the error was and, when possible, suggestions on how to fix
the problem. It consists of much of the information from the LAM FAQ (particularly in dealing with getting LAM up and running)
At present, the following LAM tools use this help file (it is expected that more will use it in future releases. If you have suggestions
for locations where more detailed error messages would be helpful, please let us know):
hboot
lamboot
lamexec
lamhalt
lamnodes
lamwipe
mpicc (hcc)
mpiCC (hcp)
mpif77 (hf77)
mpirun
recon
tkill
tping
STRUCTURE AND SYNTAX
The help file is multiple blocks of help text separated by single line delimiters. The delimiter lines are of the format:
-*-programname:topicname-*-
Where programname is the general name of the program (or group of programs) that this help message applies to, and topicname is the spe-
cific topic that this message applies two.
The special keyword ALL can be used for either the programname or the topicname in some cases; this is usually a "wildcard" value where
little specific information is available.
Within the block of the message, lines that begin with a "#" are treated as comments; they are not printed out.
Three special escape sequences can be used within the help message:
%N Where N is a number from 1 to the number of arguments that the help message is invoked with. The "%N" string is replaced with the
value of the Nth argument from the argument list. The arguments are passed from the LAM binaries themselves; they cannot be edited.
The comments in the default LAM help file explain how many arguments each message is invoked with, and what each argument is.
%perror
Shows the result of the Unix perror(3) function.
%terror
Shows the result of the LAM terror() function, which is essentially a wrapper around the Unix perror(3) function.
LOCATION OF HELP FILE
The exact location of the help file is configurable. This allows system administrators and/or users to customize the help file for their
particular environment.
When LAM attempts to print an error message from the help file, it looks for the help file in the following locations (in order):
$HOME/lam-helpfile
$HOME/lam-7.1.4-helpfile
$HOME/etc/lam-helpfile
$HOME/etc/lam-7.1.4-helpfile
$LAMHELPDIR/lam-helpfile
$LAMHELPDIR/lam-7.1.4-helpfile
$LAMHOME/etc/lam-helpfile
$LAMHOME/etc/lam-7.1.4-helpfile
$TROLLIUSHOME/etc/lam-helpfile
$TROLLIUSHOME/etc/lam-7.1.4-helpfile
$SYSCONFDIR/lam-helpfile
$SYSCONFDIR/lam-7.1.4-helpfile
Note the variable $LAMHELPDIR; this variable can be set according to platform, for example, to provide operating system-specific informa-
tion, or information specific to particular groups of machines, etc. It can also be set to provide help messages in different languages.
$SYSCONFIDIR is typically $prefix/etc, where $prefix is the location to where LAM was installed; it was the option supplied to ./configure
when LAM was built (or /usr/local/lam-7.1.4, by default). However, note that the value of $SYSCONFDIR can be overridden when LAM is con-
figured with the --sysconfdir switch.
EXAMPLES
The following is an example customization of the help for the hboot and lamboot programs, when the user supplies a host file name that is
not found.
-*-boot:open-hostfile-*-
%1 could not open the hostfile "%2" for the following reason:
%perror
Things to check:
- ensure that the file exists
try "ls -l %2"
- ensure that you have read permissions on the file
try "cat %2"
You may not need to specify a host file at all; the system
administrators have defined the all of Beowulf cluster host names in
the LAM default host name list. If you wish to use all of the Beowulf
nodes, simply execute:
%1 -v
If you have any problems with LAM, please send mail to:
lam-admin@your.domain.com
FILES
$LAMHOME/etc/lam-7.1.4-helpfile
default LAM help file
SEE ALSO
hboot(1), lamboot(1), lamexec(1), lamhalt(1), lamnodes(1), lamwipe(1), mpicc(1), mpiCC(1), mpif77(1), mpirun(1), recon(1), tkill(1),
tping(1), perror(3)
LAM 7.1.4 July, 2007 LAM-HELPFILE(5)