11-12-2008
Hi
I tried using the command but it is writing the complete file to the outputfile.
My requirment is just to take out the MAPPING DESCRIPTION =" " which is in double quotes and write to an output file..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear friends, following is the output of a script from which I want to remove spaces and new-line characters.
Example:-
Line1 abcdefghijklmnopqrstuvwxyz
Line2 mnopqrstuvwxyzabcdefghijkl
Line3 opqrstuvwxyzabcdefdefg
Here in above example, at every starting line there is a “tab” &... (4 Replies)
Discussion started by: anushree.a
4 Replies
2. Shell Programming and Scripting
Hallo,
i need a Prompting read in my script:
read -p "Enter your command: " command
But i always get this Error:
-p: is not an identifier
When I run these in c-shell i get this error
/usr/bin/read: read: bad option(s)
How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies
3. Shell Programming and Scripting
I have to read a file line by line, change it and then update the file. Problem is, when i read the file, "read" command ignores leading spaces.
The file is a script which is indented in many places for clarity. How to i make "read" command read leading spaces as well. (3 Replies)
Discussion started by: vickylife
3 Replies
4. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
5. Shell Programming and Scripting
Hello everybody,
I'm still slowly treading my way into bash scripting (without any prior programming experience) and hence my code is mostly what some might call "creative" if they meant well :D
I have created a script that serves its purpose but it does so very slowly, since it needs to work... (4 Replies)
Discussion started by: origamisven
4 Replies
6. Programming
Hi,
I have a string like this,
char str ="This, a sample string.\\nThis is the second line, \\n \\n, we will have one blank line";
if I want to use strtok() to seperate the string, which token should I use?
I tried "\n", "\\n", either not working.
peter (1 Reply)
Discussion started by: laopi
1 Replies
7. Shell Programming and Scripting
The "read" command, which is built into bash, takes words from the standard input. However, "read" is not good at taking file names if the file names contain spaces. I would like my bash script to ask the user to enter file names, which may contain spaces. Can you think about any technique for... (14 Replies)
Discussion started by: LessNux
14 Replies
8. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
9. Shell Programming and Scripting
Hi everybody,
I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o
My code:
#!/bin/sh
set -e
set -u
export IFS=
optl="Optl"
LOCSTORCLI="/opt/lsi/storcli/storcli"
($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies
10. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LKSH(1) BSD General Commands Manual LKSH(1)
NAME
lksh -- Legacy Korn shell built on mksh
SYNOPSIS
lksh [-+abCefhiklmnprUuvXx] [-+o opt] [-c string | -s | file [args ...]]
DESCRIPTION
lksh is a command interpreter intended exclusive for running legacy shell scripts. It is built on mksh; refer to its manual page for details
on the scripting language.
LEGACY MODE
lksh has the following differences from mksh:
o lksh is not suitable for use as /bin/sh.
o There is no explicit support for interactive use, nor any command line editing code. Hence, lksh is not suitable as a user's login
shell, either; use mksh instead.
o The KSH_VERSION string identifies lksh as ``LEGACY KSH'' instead of ``MIRBSD KSH''.
o Some mksh specific extensions are missing; specifically, the -T command-line option.
o lksh always uses traditional mode for constructs like:
$ set -- $(getopt ab:c "$@")
$ echo $?
POSIX mandates this to show 0, but traditional mode passes through the errorlevel from the getopt(1) command.
o lksh, unlike AT&T UNIX ksh, does not keep file descriptors > 2 private.
o lksh parses leading-zero numbers as octal (base 8).
o Integers use the host C environment's long type, not int32_t. Unsigned arithmetic is done using unsigned long, not uint32_t. Neither
value limits nor wraparound is guaranteed. Dividing the largest negative number by -1 is Undefined Behaviour (but might work on 32-bit
and 64-bit long types).
o lksh only offers the traditional ten file descriptors to scripts.
SEE ALSO
mksh(1)
https://www.mirbsd.org/mksh.htm
https://www.mirbsd.org/ksh-chan.htm
CAVEATS
lksh tries to make a cross between a legacy bourne/posix compatibl-ish shell and a legacy pdksh-alike but ``legacy'' is not exactly speci-
fied. Parsing numbers with leading zero digits or ``0x'' is relatively recent in all pdksh derivates, but supported here for completeness.
It might make sense to make this a run-time option, but that might also be overkill.
The set built-in command does not have all options one would expect from a full-blown mksh or pdksh.
Talk to the MirOS development team using the mailing list at <miros-mksh@mirbsd.org> or the #!/bin/mksh (or #ksh) IRC channel at
irc.freenode.net (Port 6697 SSL, 6667 unencrypted) if you need any further quirks or assistance, and consider migrating your legacy scripts
to work with mksh instead of requiring lksh.
MirBSD February 11, 2013 MirBSD