Sponsored Content
Full Discussion: Tcsh precmd weird question
Top Forums Shell Programming and Scripting Tcsh precmd weird question Post 303031364 by bestard on Wednesday 27th of February 2019 05:59:04 AM
Old 02-27-2019
Tcsh precmd weird question

I encountered a weird question while using tcsh. I wrote a test script trying to control 'history' behavior as below,

Code:
set history=(1000 "%h\t%Y-%W-%D %P %R\n")
set savehist=(1000 merge)
alias precmd 'history -S;history -M'

I was hoping all the user's commands input in multiple terminals can be recorded to the history file without lose.
My script can worked well in RHEL 6 ( the default tcsh version is 6.17).
However, when I tested my script in RHEL 4/5 (tcsh version 6.13 / 6.14), the precmd alias resulted in command line in malfunction.
Whatever I input on the command line after running my script, it was just jumping to the newline, nothing happened.

I have no idea what went wrong. Does anybody have idea? Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

tcsh

I'm working on OpenOffice Localization; In that I need to work most of in 'tcsh' Since I have almost work till now in 'bash', I want to explore 'tcsh' much more .. An body suggest me a way ? books ? Thanks, :) (1 Reply)
Discussion started by: kartik
1 Replies

2. UNIX for Advanced & Expert Users

Weird Question

As in Windows we have Video memory and we can access it through C programs, do we have anything similar to that in Unix and similar operating systems. If we have some sort of Video memory in Unix flavours, then how can we access it through C programs. (4 Replies)
Discussion started by: rahulrathod
4 Replies

3. UNIX for Dummies Questions & Answers

Kind of weird question

I recently purchased a book titled Hacking: The Art of Exploitation. When I got it home I read the preface and found out that i shouldnt have bought it. It says the code examples in this book were done on an x86 based computer (I have a mac). Is there anything I can do to make my mac run similar to... (2 Replies)
Discussion started by: Cyberaxe
2 Replies

4. Shell Programming and Scripting

Help me with this tcsh script.!!!!

I need to write a tcsh script which would compare files in the two folders and then send me a mail saying which of the files are missing.For eg 1) I have this folder1 containing all the files which must land on folder2 on a daily basis. 2) If a file is present in folder1 but not in... (6 Replies)
Discussion started by: kumarsaravana_s
6 Replies

5. UNIX for Dummies Questions & Answers

help in tcsh

am working in tcsh while writing a script, what is diff between foll two starting line #!/bin/csh #!/bin/csh -f Also can I use the same line for script in tcsh or I have to necessarily use #!/bin/tcsh I guess even #!/bin/sh will also do. Kindly clarify (3 Replies)
Discussion started by: mahendrakamath
3 Replies

6. Shell Programming and Scripting

simple tcsh question using foreach

I want to search line-by-line for a string in a file, and I want to do this to a series of files in a directory. I'm doing this in tcsh This works fine to do the search: while read i; do grep $i file2; done <file1.txt This also works fine to read a directory: foreach file ('/bin/ls... (1 Reply)
Discussion started by: moldoverb
1 Replies

7. Shell Programming and Scripting

logging out in tcsh

Hi! I want to log out of the tcsh shell without updating the history? Thanks, Jack. (3 Replies)
Discussion started by: jacki
3 Replies

8. Shell Programming and Scripting

tcsh help

Does anyone no way my .tcsh_history file is filling up with a bunch of crap?? It is filled with lines like: ! ls eccracrascratcd ! ls mecd /hchoo "cratch2/mecd /sch2/mecd /sh2/mecd /scratchcd /scratch2/mecd /scratcraecd /ls mo "ls" > ! ls eccratch2/mecd /sc/ls"d /scratch2/mecd histecho "ls" o... (2 Replies)
Discussion started by: Bic121
2 Replies

9. Shell Programming and Scripting

Tcsh to sh

Dear all, I have piece of command from tcsh, which I would like to be in my .bashrc file. However, I am comletely blank about the tcsh commandline. if (-e ~/forum/dir/code.sh) then source ~/forum/dir/code.sh endif Any piece of suggestions how to convert it to sh way? Thank you emily (5 Replies)
Discussion started by: emily
5 Replies

10. Shell Programming and Scripting

Tcsh Problems with # and []

Hallo, I try to write a program which processes an input-file linewise. I created the following minimal example: hash-problem:#!/bin/tcsh foreach text ("`cat $1`") echo $text endUsually, it works as expected, but there are two problems: 1. If the argument of hash-problem has an... (3 Replies)
Discussion started by: DanielDD
3 Replies
MINCHISTORY(1)						User Contributed Perl Documentation					    MINCHISTORY(1)

NAME
minchistory - prints history information for minc files SYNOPSIS
minchistory [options] <file1.mnc> [<file2.mnc> ... ] minchistory will dump the internal history of one or more MINC files DESCRIPTION
minchistory is a perl script that prints the history information in a collection of MINC files. Most MINC files contain an internal "audit trail" that lists the commands used to create the MINC file. This tool provides a convenient way to examine this information. For each file, minchistory prints a title line followed by a series of lines which list the history information for that file. --- History of <filename> --- [01] Wed Oct 13 15:35:35 EST 2004>>>> dicom3_to_minc . [02] Wed Oct 13 15:43:34 2004>>> mincreshape +direction bob-jones_256x256x256_T1.mnc out.mnc -dimorder zspace,yspace,xspace -clobber minchistory is essentially an alias for the following command with a bit of pretty printing added. mincinfo -attvalue :history B<filename.mnc> OPTIONS
-v, --verbose Be noisy when doing things --version Print version number and exit -h, --help Dump some quick help output --man Dump a man page SEE ALSO
mincinfo(1) AUTHOR
Andrew Janke - a.janke@gmail.com COPYRIGHTS
Copyright 2000 by Andrew L Janke perl v5.14.2 2012-03-09 MINCHISTORY(1)
All times are GMT -4. The time now is 01:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy