ls -l --full-time


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ls -l --full-time
# 1  
Old 12-12-2001
Question ls -l --full-time

How can i write a shell script to display only the dates and times listed when i type ls -l --full-time. i have something, but it tells me there is an illegal variable name. here's what i have:

#! /bin/tcsh

set a = `ls -l --full-time`
set b = `ls -l --full-time | wc -l`

while($b > 0)

echo $a[8] $a[9] $a[10] $[11] $a[12]
echo $b
$b--
tail -$b `ls -l --full-time` > modified

end



unset a
unset b
# 2  
Old 12-12-2001
I don't think you can do "$b--" in tcsh. Try:

@ b = $b - 1
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. What is on Your Mind?

The C64 is back, this time full-sized with a working keyboard for the dedicated retro home-computer

Retro Games has announced that the C64 is back, this time full-sized with a working keyboard for the dedicated retro home-computer fan, available December 2019. See also: CNN: Iconic 80s computer The Commodore 64 to return with fully-functional keyboard YouTube: The C64 | Trailer ... (2 Replies)
Discussion started by: Neo
2 Replies

2. AIX

100% Inode full with only 67% FS full.

AIX Version 6.1 and 7.1. I understand that when the OS initially creates the FS and inodes, its pretty strict, but not always tuned to a 1:1 ratio. I see the same thing when adding a whole disk LV to a separate device. It seems that when we expand a filesystem the inodes don't get tuned... (5 Replies)
Discussion started by: mrmurdock
5 Replies

3. Solaris

modifying date and time and time zone on solaris 5.10 with (redundant server) veritas

I have a cluster of two Solaris server (veritas cluster). one working and the other is standby I am going to change the date on them , and am looking for a secure solution as it is giving an important service. my opinion is that the active one doesn't need to be restarted (if I don't change the... (1 Reply)
Discussion started by: barry1946
1 Replies

4. Shell Programming and Scripting

How to extract strings from full path when full path is not fixed

/Path/snowbird9/nrfCompMgrRave1230100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird6/nrfCompMgrRave1220100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird14/nrfCompMgrRave920100920.log.gz:09/20/2010 06:14:51 ERROR Error Message.... (0 Replies)
Discussion started by: Shirisha
0 Replies

5. UNIX for Advanced & Expert Users

How To Provide Time Sync Using Nts-150 Time Server On Unix Network?

can anybody tel lme,how to instal NTS -150 on a unix network,it needs some patch to fetch time frm serve,,?? (2 Replies)
Discussion started by: pesty
2 Replies
Login or Register to Ask a Question