-
Notifications
You must be signed in to change notification settings - Fork 5
Shuai YUAN edited this page Jun 23, 2021
·
6 revisions
#!/bin/csh
set z="/a/b/c/"
foreach i (`ls -d $z`)
echo $i
end
set ac `echo $AC | tr "[:upper:]" "[:lower:]"`
readlink -f relative_file_name
ABS_PATH=`cd "$1"; pwd`
# redirect both standard output and error to a file with:
xxx >& filename
if ( { grep -q 'Pattern' file } ) then
echo "Pattern found"
else
echo "Pattern not found"
endif
grep -q 'Pattern' file
if ( $status == 0 ) then
echo "Pattern found"
else
echo "Pattern not found"
endif
set path = ($path /usr/local/bin)
set history = 2000 # History remembered is 2000
set savehist = (2000 merge) # Save and merge with existing saved
set histfile = ~/.tcsh_history
...in .tcshrc and this line...
history -S
...in .logout solved the problem.