10-30-2009
Quote:
Originally Posted by
smarty86
if i use case then i have to write whole thing inside that only.. but i need to use it manier times...
so please tell me how can i check with if statement!
With the solution above and the link below you should be able to try it out for yourself.
Test Constructs
Regards
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everybody !
GOT SOMETHING INTERESTING...
I am trying to retain line number for a text document.. usually we get line numbers in VI using :set nu , but I want to permanently store them. It's a 4000 lines of text and I want grep/search it for a list of words/fields stored in a different... (2 Replies)
Discussion started by: sdlayeeq
2 Replies
2. Shell Programming and Scripting
cat dailyreports | grep "Important list" | awk -F":" '{print $2}' | awk -F" " '{print $1}'
hey guys, after running the above combination of cat and awk, i get the below output:
3
4
2
9
now, i need to add these numbers up all in one line. i dont know what to add to that cat and awk one... (2 Replies)
Discussion started by: Terrible
2 Replies
3. Shell Programming and Scripting
Friends,
I have to write a shell script,the description is----
i Have to check the uniqueness of the numbers in a file.
A file is containing 200thousand tickets and a ticket have 15 numbers in asecending order.And there is a strip that is having 6 tickets that means 90 numbers.I... (7 Replies)
Discussion started by: namishtiwari
7 Replies
4. Shell Programming and Scripting
Suppose u have a file like
1 30
ABCSAAHSNJQJALBALMKAANKAMLAMALK
4562676268836826826868268468368282972982
2863923792102370179372012792701739729291
31 60... (8 Replies)
Discussion started by: cdfd123
8 Replies
5. Shell Programming and Scripting
I want to reverse a the following:
00:11:22:33:44:55
I currently use something like below to pass it as is.
But now I want the same script to reverse the above and pass it to ethtool.
// psuedo code
i=0
skip=0
for m in $@
do
if
then
skip=1
... (1 Reply)
Discussion started by: bhanu.nani
1 Replies
6. Shell Programming and Scripting
How can we compare 2 floating point numbers in SHELL script? (11 Replies)
Discussion started by: dearanik
11 Replies
7. Shell Programming and Scripting
pls give me the solution for this i need it for my exam pls pls pls
Shell script to find the sum of first n Fibonacci numbers (1 Reply)
Discussion started by: Kshitija
1 Replies
8. Shell Programming and Scripting
file A
E969K
D223L
E400L
E34L
file B
predicted 3
1 250
251 500
501 1000
The output should be
E969K 501 1000
D223L 1 250
E400L 251 500
E34L 1 250
I tried in this way (1 Reply)
Discussion started by: cdfd123
1 Replies
9. Shell Programming and Scripting
Hi all;
Here is my file:
V1.3=4
V1.4=5
V1.1=3
V1.2=6
V1.3=6
Please, can you help me to write a script shell that counts the sum of values in my file (4+5+3+6+6) ?
Thank you so much for help.
Kind regards. (3 Replies)
Discussion started by: chercheur111
3 Replies
10. UNIX for Beginners Questions & Answers
Hello,
I would like to write script to tail a file for different environment
But the number of lines are keep changing
How can I write a script
For example:
env could : A, B or C
and log files could be a.log, b.log and c.log
with the number of lines can change
say sometimes it 100 last... (9 Replies)
Discussion started by: encrypt_decrypt
9 Replies
LDP(7) Miscellaneous Information Manual LDP(7)
NAME
LDP - Intro to the Linux Documentation Project, with help, guides and documents
SYNOPSIS
The Linux Documentation Project (LDP) provides a variety of free documentation resources including guides, FAQs, HOWTOs, and man-pages to
the Linux community.
AUTHORS
The various documents in the LDP archives are maintained by individual authors, and are listed in the beginning of each HOWTO. If you have
any questions or inputs to a document we encourage you to contact the authors directly.
WEB PAGES
The LDP has its own dedicated web site as do many of the various translations projects which are linked from the main LDP web site at:
http://www.tldp.org/
MAN PAGES
A web page with status information for manual pages and translations is found at:
http://www.win.tue.nl/~aeb/linux/man/
MAILING LISTS
LDP has a number of mailing lists, such as
<announce@en.tlpd.org>
Announcements from the LDP project
<discuss@en.tldp.org>
General discussion on the LDP project
<docbook@en.tldp.org>
Questions about the use of DocBook
For subscription information, see the website.
If you are interested in DocBook beyond the simple markup of your LDP document, you may want to consider joining one of the OASIS DocBook
mailing lists. Please see http://docbook.org/mailinglist/index.html for more information.
FILES
Most distributions include the HOWTOs and mini-HOWTOs in the installation
/usr/doc/ (old place for documentation)
/usr/share/doc/ (new place for documentation)
/usr/share/doc/HOWTO/ (HOWTO files)
/usr/share/doc/HOWTO/mini/ (mini-HOWTO files)
SEE ALSO
info(1), man(1), xman(1x)
info pages as read with emacs(1) or info(1)
LDP
2001-11-15 LDP(7)