02-23-2011
Thanks jlliagre
Your suggestion works fine in RHEL.
Quote:
RHEL/FC9 output
$cat .3
1
2
But on AIX i am still getting the same file name
Quote:
AIX 6.1 output
$cat .3
.3
1
2
But i got a suggestion from web to fix this on AIX too.
Quote:
$ls | sort | tee > 3
$cat 3
1
2
Thanks every one for your inputs
Aravind
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is it possible to sh a command and receive the standard output on the scrren and use file redirection ie ls -lt > test. Also On SCO-UNIX there was a tellme command which displayed a message when a script had finished running is there something similar for HP UNIX as it is not working. (4 Replies)
Discussion started by: namtab
4 Replies
2. Shell Programming and Scripting
Oracle procedure create files on UNIX folder on a regular basis. I need to FTP files onto windows server and place the files, based on their name, in the corresponding folders. File name is as follows: ccyymmddfoldernamefile.txt; Folder Name length could be of any size; however, the prefix and... (3 Replies)
Discussion started by: MeganP
3 Replies
3. Shell Programming and Scripting
my querry is
suppose i have duplicate std i/p with FD-3 --exec 0<&3
now redirected std i/p to a file ----exec 0<file1
suppose i am reading the file line by line --while read LINE
cutting some fields and comparing it with a variable and if a match is found
... (0 Replies)
Discussion started by: mobydick
0 Replies
4. Shell Programming and Scripting
Hi,
I have a requirement to move a file from one folder(a) to another folder(b) only when folder (b) have a write permission. Folder permission is 755
If the permission is otherthan 755 we need to come out of the loop
I will appreciate your help
Thanks
Soll (1 Reply)
Discussion started by: sollins
1 Replies
5. Shell Programming and Scripting
Hi,
I have a fbackup step as below
/bin/nice /etc/fbackup -f /dev/rmt/0m -i / -I /opt/monitrol/tmp/Index.full
Now the errors that i will get in case of the fbackup step, I want to redirect them to a file. Please help me how to redirect to a file.
Thanks,
Avik. (5 Replies)
Discussion started by: avik.nandi
5 Replies
6. Shell Programming and Scripting
Hi all,
I am working with the Grinder tool (unrelated to my question) to redirect the output of a program to a file as follows:
java -cp $CLASSPATH net.grinder.TCPProxy > grinder.txt
This is a proxy server which pipes output to a file. When I do something on my proxy, more and more goes to... (1 Reply)
Discussion started by: Annorax
1 Replies
7. UNIX for Dummies Questions & Answers
Suppose I have a file named a
When I write
cat a>a
The following error message is displayed
cat: a: input file is output file
and my file a is truncated to zero size.
Also the exit status of the last command is 1
Can someone tell me what actually happens when I do so? (1 Reply)
Discussion started by: aagajaba
1 Replies
8. Shell Programming and Scripting
This is the file structure:
DESKTOP/Root of Photo Folders/Folder1qweqwasdfsd/*jpg
DESKTOP/Root of Photo Folders/Folder2asdasdasd/*jpg
DESKTOP/Root of Photo Folders/Folder3asdadfhgasdf/*jpg
DESKTOP/Root of Photo Folders/Folder4qwetwdfsdfg/*jpg
DESKTOP/Root of Photo... (4 Replies)
Discussion started by: guptaxpn
4 Replies
9. Shell Programming and Scripting
Hi all,
let me explain my requirments
i am having 5 folder with different name for eg) abc , cdf , efd, rtg, ead
each 5 folders contain 15 files
i want to move 10 files to some other folder, remain 5 files should be there in the same folder.
give me some suggestion on this. (6 Replies)
Discussion started by: natraj005
6 Replies
10. Shell Programming and Scripting
I am struck up with a problem and that is with output redirection.
I used all the ways for the redirection of the output of c binary to a file, still it is failing.
Here are the different ways which I have used:
./a.out | tee -a /root/tmp.txt 2>&1
./a.out | tee -a /root/tmp.txt 1>&1
./a.out |... (2 Replies)
Discussion started by: Maya29988
2 Replies
msh(1mh) msh(1mh)
Name
msh - MH shell
Syntax
msh [ -help ] [ -prompt string ] [ file ]
Description
The command is an interactive program that implements a subset of the normal MH commands operating on a single file in format. That is, is
used to read a file that contains a number of messages, as opposed to the standard MH style of reading a number of files, each file being a
separate message in a folder.
The chief advantage of is that, unlike the normal MH style, it allows a file to have more than one message in it. In addition, can be used
on other files, such as message archives which have been packed using
When invoked, reads the named file, and enters a command loop. You can type most of the normal MH commands. The syntax and semantics of
these commands typed to are identical to their MH counterparts. In cases where the nature of would be inconsistent with the way MH works
(for example, specifying a +folder with some commands), will duly inform you. The commands that currently supports are:
ali burst comp dist folder
forw inc mark mhmail msgchk
next packf pick prev refile
repl rmm scan send show
sortm whatnow whom
In addition, has a command which gives a brief overview of all the options. To terminate either type <CTRL/D>, or use the command. If the
file is writable and has been modified, then using will ask you if the file should be updated.
A redirection facility is supported by Commands may be followed by one of the following standard ULTRIX symbols:
| Open an interprocess channel; connect output to another ULTRIX command.
> Write output to file.
>> Append output to file.
If file starts with a tilde (~), then a C-shell-like expansion takes place. Note that commands are interpreted by
When parsing commands to the left of any redirection symbol, will honor the backslash () as the quote next-character symbol, and double
quotes (") as quote-word delimiters. All other input tokens are separated by white space (spaces and tabs).
You may wish to use an alternative profile for the commands that executes; see for details of the $MH environment variable.
Options
-help Prints a list of the valid options for this command.
-prompt string
Sets the prompt for If the string you specify includes white space, you must enclose it in double quotes ("). If you do not
specify this option, the default prompt is (msh).
The following defaults are used by
file defaults to
-prompt (msh)
Restrictions
The shell is not the C-shell, and a lot of the facilities provided by the latter are not present in the former. In particular, does not
support back-quoting, history substitutions, variable substitutions, or alias substitutions.
does not understand back-quoting. The only effective way to use inside is to always use the -seq select option. If you add the following
line to your will work equally well from both the shell and
pick: -seq select -list
There is a strict limit of messages per file in format which can handle. Usually, this limit is 1000 messages.
Profile Components
Path: To determine your Mail directory
Msg-Protect: To set protections when creating a new file
fileproc: Program to file messages
showproc: Program to show messages
Files
The user profile.
The system customization file.
See Also
csh(1), packf(1mh), sh(1), mh_profile(5mh)
msh(1mh)