10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am running below command as root user
#nodetool cfstats tests | grep "Memtable switch count"
Memtable switch count: 12
Where as when I try to run same command as another user it gives different result.
#su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Discussion started by: Pushpraj
10 Replies
2. Shell Programming and Scripting
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
12 Replies
3. Shell Programming and Scripting
Running below line gives 3957 as length of longest line in file 20121119_SRMNotes_init.dat
awk ' { if ( length > 3950 ) { x = length } }END{ print x }' 20121119_SRMNotes_init.dat
While wc -L 20121119_SRMNotes_init.dat gives output as 4329. Why is there a difference between these two commands.... (2 Replies)
Discussion started by: Satish Mantha
2 Replies
4. Shell Programming and Scripting
Hi,
Its bit urget for me to complete. pls help me.
I am parsing 2 file 1. INDATA(Data file) 2. GRPFIL(Reference)
every record in INDATA should be verified with GRP_DATA.
I am seeing the output from only the last line of ref file, its not searching all the lines.
INDATA sample... (1 Reply)
Discussion started by: hyperion.krish
1 Replies
5. UNIX for Dummies Questions & Answers
Can anyone tell this:
If two users are logged into the same server from different locations. Is there a way to see the history command of the other user? I tried the history command, but it is showing me only the commands I used.
Thanks in advance for your help.
Iamnew2solaris (1 Reply)
Discussion started by: iamnew2solaris
1 Replies
6. AIX
As a newbie sys admin, how do i find out what other login session command line history, what are the commands they used?
Thanks.
leim (4 Replies)
Discussion started by: leim
4 Replies
7. UNIX for Dummies Questions & Answers
By default, we use ksh (88) as our shell. I prefer bash, so I added this line to my .profile:
exec bash -o viI also added this to my .bashrc?:
#***********************************************
#These are important tweaks specific to BASH:
#***********************************************... (1 Reply)
Discussion started by: mrwatkin
1 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
i want the last login details along with year.
i tried below command but not giving me the year of last login.
last <$Userid> | head -1
i heard that if it is current year then it wont display the year else it will display the year. is it so?
if yes then , is there any way of... (1 Reply)
Discussion started by: ani_rvce
1 Replies
9. Shell Programming and Scripting
Hi All,
i want the last login details along with year.
i tried below command but not giving me the year of last login.
last <$Userid> | head -1
i heard that if it is current year then it wont display the year else it will display the year. is it so?
if yes then , is there any way of... (1 Reply)
Discussion started by: ani_rvce
1 Replies
10. UNIX for Advanced & Expert Users
I am running Solaris 8 and using ksh. The history file (.sh_history) helps a lot, but it seems to get 'reset' after a certain period of time. In other words, after some usage of the shell, the command history would disappear and start anew. Is there some facility to specify the period of time to... (1 Reply)
Discussion started by: Sowser
1 Replies
history(n) Provides a history for Entry widgets history(n)
__________________________________________________________________________________________________________________________________________________
NAME
history - Provides a history for Entry widgets
SYNOPSIS
package require Tcl 8.4
package require Tk 8.4
package require history ?0.1?
::history::init pathName ?length?
::history::remove pathName
::history::add pathName text
::history::get pathName
::history::clear pathName
::history::configure pathName option ?value?
bell
_________________________________________________________________
DESCRIPTION
This package provides a convenient history mechanism for Entry widgets. The history may be accessed with the up and down arrow keys.
::history::init pathName ?length?
Arranges to remember the history of the named Entry widget. An optional length determines the number of history entries to keep.
This may be changed later with ::history::configure. History entries must be added with the ::history::add command before they can
be seen.
::history::remove pathName
Forgets all history entries for the Entry pathName and removes the history bindings.
::history::add pathName text
This command is used to add history entries to an Entry that has previously had ::history::init called on it. This command should be
called from your Entry handler with the contents of the entry (or whatever you wish to add to the history).
::history::get pathName
This command returns a list containing the history entries for the Entry pathName
::history::clear pathName
This command clears the history list for the named Entry.
::history::configure pathName option ?value?
This command queries or sets configuration options. Currently the options recognized are length and alert. Setting the length deter-
mines the number of history entries to keep for the named Entry. Alert specifies the command to run when the user reaches the end of
the history, it defaults to
bell
entry .e
bind .e <Return> [list ProcessEntry %W]
::history::init .e
pack .e
proc ProcessEntry {w} {
set text [$w get]
if {$text == ""} { return }
::history::add $w $text
puts $text
$w delete 0 end
}
KEYWORDS
entry, history
history 0.1 history(n)