11-20-2006
scripting problem ( KSh )
Hi all,
I want to find out last word in each line ...
suppose my file contains following lines ...
this is unix forum
here we share knowledge
it is very interactive
Now i need the output as :- ( the last word od each line )
forum
knowledge
interactive
Please help ,
Thanks in advance
Dhananjay
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Will a shell script written in shell for HP/UX run on Solaris? (1 Reply)
Discussion started by: dstaller
1 Replies
2. Shell Programming and Scripting
is there any sprintf function
in korn shell scripting,
or anything similar to sprintf? (2 Replies)
Discussion started by: gfhgfnhhn
2 Replies
3. Shell Programming and Scripting
Hi I need to insert a page break into a file based on matching a phrase in the file. :confused: I am doing this with a ksh script on a Unix box.
Any help would be greatly appreciated.
Thanks (5 Replies)
Discussion started by: scrappycc
5 Replies
4. Shell Programming and Scripting
I have the file as below
server1 no dr aix 5300-05-03 9119-595 20-18888 yes ftp-eagle
server2 no dr aix 5300-05-03 9119-595 20-18888 yes ftp-eagle
server3 yes dr aix 5300-05-03 9119-595 20-18888 yes ftp-eagle
server4 ... (1 Reply)
Discussion started by: praveenbvarrier
1 Replies
5. Shell Programming and Scripting
I am trying to create a script to manipulate numerous file and at first I thought it would be a simple task but at this point i am ready to break my computer! I am new to unix scripting so hopefully someone out there thinks this is super easy and can help me out!
A sample of the problem file is... (2 Replies)
Discussion started by: theqcup
2 Replies
6. Shell Programming and Scripting
Hi,
Below is the code for my script
#!/bin/ksh
for file in "file1.txt" "file2.txt" "file3.txt" "file4.txt"
do
L="$(tail -1 $file)"
NUM=${L%%|*}
DAT=${L##*|}
echo $NUM
echo $DAT
done
Now here,suppose for file1.txt
L will have data like 56|06-07-2010
So, it should be (7 Replies)
Discussion started by: fidelis
7 Replies
7. Shell Programming and Scripting
I am looking for a script which does the following
Script will run daily.
1.It will get snapshot off all filesystems including nfs mounts, automounts and clearcase mounts.
2.Then it will compare new snapshot with the snapshot created in the previous run.
3.If filesystem exists in... (20 Replies)
Discussion started by: saidiya
20 Replies
8. Shell Programming and Scripting
Hello,
I have following problem...
I have two shell-scripts. The first one is only a script to add Arrays (working very good). In the second script I want to read the Arrays (also working good). I don't know how to explain it...
script:
#!/usr/bin/ksh
. test.sh ... (14 Replies)
Discussion started by: mon5tar
14 Replies
9. Shell Programming and Scripting
Hi All,
Can you please let me know what I missed in the below function? Whenever I try to execute the script i am getting
syntax error at line 101 : `fi' unexpected
Function is
function DELNWE5O {
export ORACLE_HOME=/ora00/app/oracle/product/11.2.0/grid_1
export... (9 Replies)
Discussion started by: pvmanikandan
9 Replies
10. Shell Programming and Scripting
Hi Guys,
I am trying to learn to script.
first I have 2 server, A and B.
A with IP 192.168.82.22. B with IP 192.168.82.44.
Both with login user admin and password admin.
server A will generate a file every day with name gg.log under /app/gg/20171002.log. I wish to write a script to copy the... (7 Replies)
Discussion started by: leecopper
7 Replies
LEARN ABOUT DEBIAN
cf-know
cf-know(8) System Manager's Manual cf-know(8)
NAME
cf-know - cfengine's knowledge agent
SYNOPSIS
:
cf-know [options]
DESCRIPTION
:
The knowledge management agent is capable of building and analysing a semantic knowledge network. It can configure a relational database to
contain an ISO standard topic map and permit regular-expression based searching of the map. Analysis of the semantic network can be per-
formed providing graphical output of the data, and cf-know can assemble and converge the reference manual for the current version of the
Cfengine software. cfengine is a self-healing configuration and change management based system. You can think of cfengine as a very high
level language, much higher level than Perl or shell. Asingle statement is called a promise, and compliance can result in many hundreds of
filesbeing created, or the permissions of many hundreds offiles being set. The idea of cfengine is to create a one or more sets of configu-
ration files which willclassify and describe the setup of every host in a network.
COMMAND LINE OPTIONS
:
--help, -h
Print the help message
--build, -b
Build and store topic map in the CFDB
--debug, -d
Set debugging level 0,1,2,3
--verbose, -v
Output verbose information about the behaviour of the agent
--version, -V
Output the version of the software
--file, -f
Specify an alternative input file than the default
--manual, -m
Generate reference manual from internal data
--manpage, -M
Generate reference manpage from internal data
--stories, -z
Look up stories for a given topic on the command line
--syntax, -S
Print a syntax summary of the optional keyword or this cfengine version
--topics, -T
Show all topic names in CFEngine
--test, -t
Generate test data
--removetest, -r
Remove test data
--updatetest, -u
Update test data
AUTHOR
Mark Burgess and CFEngine AS
INFORMATION
Bug reports: http://bug.cfengine.com, .PP Community help: http://forum.cfengine.com
Community info: http://www.cfengine.com/pages/community
Support services: http://www.cfengine.com
This software is Copyright (C) 2008-2013 CFEngine AS.
Maintenance Commands cf-know(8)