04-17-2007
In VI the following works ,
:%s/^M//g
OR
Give the below ones a try,
tr -d \015 \032 < inputFile
tr -d '^M' < inputFile
sed 's/^M//g' < inputFile
Thanks
Nagarajan Ganesan
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
countA=`awk '/X/''{print substr($0,38,1)}' fName | wc -l`
countB=`wc -l fName | awk '{print int($1)}'`
echo > temp
ratio=`awk -va=$countA -vc=$countB '{printf "%.4f", a/c}' temp`
After running script for above I am getting an error as :
awk: 0602-533 Cannot find or open file -vc=25.
The... (3 Replies)
Discussion started by: videsh77
3 Replies
2. AIX
Following code is working in bash but not in ksh.
Can someone please send me an alternative?
#!/bin/ksh
fname="EOA.dmp"
echo $fname
logname=${fname/.dmp/.log}
echo $logname
I am getting below error in ksh
"testcmd: logname=${fname/.dmp/.log}: 0403-011 The specified substitution is not... (2 Replies)
Discussion started by: arsheshadri
2 Replies
3. Solaris
Hi,
Following code is working in bash but not in ksh.
Can someone please send me an alternative?
#!/bin/ksh
fname="EOA.dmp"
echo $fname
logname=${fname/.dmp/.log}
echo $logname
I am getting below error in ksh
"testcmd: logname=${fname/.dmp/.log}: 0403-011 The specified substitution... (3 Replies)
Discussion started by: arsheshadri
3 Replies
4. UNIX for Advanced & Expert Users
I cannot seem to get this text file to format. Its as if the awk statement is being treated as a simple cat command.
I manned awk and it was very confusing. I viewed previous posts on this board and I got the same results as with the
the awk command statement shown here. Please help.
... (6 Replies)
Discussion started by: tekline
6 Replies
5. Linux
i am not able to install solaris 10
i have installed solaris many times succesfully with wotking network
after that abrupt power failure i was never able to start solaris and neither install during install it hangs
IS IT PROBABLE THAT BIOS OR SOME OTHER SETTINGS RELATED TO HARDWARE IS... (0 Replies)
Discussion started by: simaich8
0 Replies
6. UNIX for Dummies Questions & Answers
I know this script is crummy, but I was just messing around.. how do I get sed's insert command to allow variable expansion to show the filename?
#!/bin/bash
filename=`echo $0`
/usr/bin/sed '/#include/ {
i\
the filename is `$filename`
}' $1
exit 0 (8 Replies)
Discussion started by: glev2005
8 Replies
7. UNIX for Dummies Questions & Answers
Hey, guys!
Trying to research this is such a pain since the read command itself is a common word. Try searching "unix OR linux read command examples" or using the command substitution keyword. :eek:
So, I wanted to use a command statement similar to the following.
This is kinda taken... (2 Replies)
Discussion started by: ProGrammar
2 Replies
8. Shell Programming and Scripting
Hi I'm using ksh.
And i'm trying to get the substring like below.
but giving the following error
#!/bin/ksh
foo=teststring
bar=${foo:0:5}
echo $bar
And the error is
./sbstr_test.sh: bar=${foo:0:5}: bad substitution
what is wrong in this script. Please correct me
... (3 Replies)
Discussion started by: smile689
3 Replies
9. Shell Programming and Scripting
Hi Gurus,
Not able to catch what's going wrong here. I just want to get output as "tree".
server:/mk/app/nexapp $ echo $SHELL
/usr/bin/ksh
server:/mk/app/nexapp $ export db_name1="tree"
server:/mk/app/nexapp $ export i=1
1st try:
server:/mk/app/nexapp $ echo $(db_name$i)
ksh: db_name1: ... (3 Replies)
Discussion started by: mukesh.lalwani
3 Replies
10. Shell Programming and Scripting
I am trying add a prefix variable(string) to command output.
sed parameter substitution is not working.
- I have found some issues on my end of testing,, please delete this thread for now. (1 Reply)
Discussion started by: kchinnam
1 Replies
LEARN ABOUT DEBIAN
mkusers
MKUSERS(8) System Manager's Manual MKUSERS(8)
NAME
MkUsers - Batch creating multiple XMail accounts
SYNOPSIS
MkUsers [options]
DESCRIPTION
This command line utility enable You to create user accounts structure by giving it a formatted list of users parameters or a formatted
text file. This utility can be also used to create a random number users, that is useful for me for testing the server performance.
OPTIONS
-a numusers
Number of users to create in auto-mode.
-d domain
Domain name in auto-mode.
-f inputFile
Input file name {stdin}.
-u username
Radix user name in auto-mode.
-r rootdir
Mail root path {./}.
-s mboxsize
Mailbox maximum size {10000}.
-i useridbase
Base user id {1}.
-m Create Maildir boxes.
-h show help message.
USAGE
Input file format is
domain;username;password;real-name;homepage[NEWLINE]
where a character # as the very first one in a line is used to comment the entire line.
If a file mailusers.tab already exist in mail root path MkUsers exit without overwriting the existing copy. This protect You by accidental
overwriting of Your file when playing inside the real MAIL_ROOT directory. So if You want to setup the root directory ( -r ... ) as
MAIL_ROOT You must delete by hand the existing file. If You setup the root directory ( -r ... ) as MAIL_ROOT You MUST have XMail stopped
before running MkUsers. Existing files and directories will be not overwrited by MkUsers so You can keep Your users db into the formatted
text file ( or generate it by a database dump for example ) and run MkUsers to create the structure. Remeber that You've to add new domains
in domains.tab file by hand.
NOTES
MkUsers is intended as a bulk-mode utility, not to create single users coz for this need CtrlClnt ( or other GUI/Web configuration utili-
ties ) is better suited.
SEE ALSO
CtrlClnt(1), XMail(8).
AUTHOR
XMail program was written by Davide Libenzi <davidel@xmailserver.org>. This manual page was written by Radim Kolar <hsn@cybermail.net>,
for the Debian GNU/Linux system (but may be used by others).
March 12, 2002 MKUSERS(8)