08-21-2009
i tried with this (what u sent ) but i am getting output without swapping the fields 1 and 2
i want swapping output sir
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
i want a shell script to get the date which is mentioned in the first line of a file.
file format is:
#EOD rates on 20050228 at 22:06:37
--------
--------
-------
first line length is always fixed. (4 Replies)
Discussion started by: sasi
4 Replies
2. UNIX for Dummies Questions & Answers
I've noticed most of my postings here are because of syntax errors.
So I want to begin compiling a large txt file that contains all the "man <cmd>" of the commands I most have problems with. I ran a "man nawk >> nawk.txt" but it included a header/footer on each "page". Anyone know how I'd be... (6 Replies)
Discussion started by: yongho
6 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
How can I move only files to another destination using mv cmd in hp-ux. (2 Replies)
Discussion started by: mhbd
2 Replies
4. Shell Programming and Scripting
I suppose this is a silly newbie Q, but I have a set of text I am inserting into a file using a sed cmd and before I insert, I want to ask the sed operation to move to add a carriage return first, and then place my new line.
Is there scope within the sed command to do this - i have tried "\n"... (6 Replies)
Discussion started by: sirtrancealot
6 Replies
5. UNIX for Dummies Questions & Answers
hi friends
i am not getting any idea about how to implement the following with the help of SED cmd
1)need a sed command that deletes the first character in each line in a file
2)need sed command that deletes the character before the last character in each line in a file
... (7 Replies)
Discussion started by: sankar_vitam
7 Replies
6. Shell Programming and Scripting
Hi all .... vexing problem here ...
I am using sed to replace some special characters in a .txt file:
sed -e 's/_<ED>_/_355_/g;s/_<F3>_/_363_/g;s/_<E1>_/_341_/g' filename.txt
This command replaces <ED> with í , <F3> with ó and <E1> with á.
When I run the command to standard output, it works... (1 Reply)
Discussion started by: crumplecrap
1 Replies
7. Shell Programming and Scripting
Hi,
I am using SunOS
I want to serch my previous command
from unix prompt
(like on AIX we can search by ESC -k)
how to get in SunOs
urgent help require. (10 Replies)
Discussion started by: RahulJoshi
10 Replies
8. Shell Programming and Scripting
Hello,
There's a third-party application's command that shows the application's status like "tail -f verybusy.log". When use the command, the output comes every 1-sec. but when it goes in a script below the output comes every 8-sec...What is the problem and how can I fix it?
open(CMD,... (2 Replies)
Discussion started by: Shawn, Lee
2 Replies
9. Shell Programming and Scripting
Hello,
Is it possible to embed the command output to the replacement of sed? Say I need to replace all the blank lines with random strings:
input:
ACCTTCGTCTTCTGG
GCTTGAGATGGTCCA
GCAGGGCTAGTGACG
GACGAGTCTCTTGAC
ACCAAATCAAAGATCand output is:
>26aa36d934d44f06d15b3aab4645a602 $(date |... (9 Replies)
Discussion started by: yifangt
9 Replies
10. Shell Programming and Scripting
Hi i am new to shell scripting and any help is really appreciated.
my requirement is in,
ps -e -o pid,uname,cmd
how can i split and take only the cmd part from it.
I tried awk but the issue is when the cmd is returning a lengthy command which itself has some spaces it is truncating the... (7 Replies)
Discussion started by: Jojo90
7 Replies