10-05-2006
script to loop and check jumping seq.
Hi,
Normally, I will manually to use "ll" command to list the following file from \FILE\CACHE\ directory and check the jump seq. Can I write a script to loop or/and check jump seq file (if jumped seq and show "missing seq no" message for me)
-rw-rw----+ 1 user develop 14012 Sep 4 13:04 HOLIDAY01067.archived
-rw-rw----+ 1 user develop 23870 Sep 12 11:57 HOLIDAY01068.archived
-rw-rw----+ 1 user develop 37578 Sep 4 13:04 HOLIDAY01069.archived
-rw-rw----+ 1 user develop 19980 Sep 4 13:04 HOLIDAY01070.archived
-rw-rw----+ 1 user develop 26563 Sep 5 04:13 HOLIDAY01071.archived
-rw-rw----+ 1 user develop 38926 Sep 6 05:05 HOLIDAY01072.archived
-rw-rw----+ 1 user develop 45420 Sep 7 03:52 HOLIDAY01073.archived
-rw-rw----+ 1 user develop 33835 Sep 8 04:55 HOLIDAY01074.archived
-rw-rw----+ 1 user develop 40949 Sep 9 07:28 HOLIDAY01075.archived
-rw-rw----+ 1 user develop 24224 Sep 10 04:50 HOLIDAY01076.archived
-rw-rw----+ 1 user develop 16763 Sep 11 08:18 HOLIDAY01077.archived
-rw-rw----+ 1 user develop 13775 Sep 12 08:33 HOLIDAY01078.archived
-rw-rw----+ 1 user develop 12330 Sep 13 05:54 HOLIDAY01079.archived
-rw-rw----+ 1 user develop 29483 Sep 14 06:02 HOLIDAY01080.archived
-rw-rw----+ 1 user develop 40467 Sep 15 04:54 HOLIDAY01081.archived
-rw-rw----+ 1 user develop 26486 Sep 16 03:05 HOLIDAY01082.archived
-rw-rw----+ 1 user develop 51543 Sep 17 07:11 HOLIDAY01083.archived
-rw-rw----+ 1 user develop 33843 Sep 18 07:15 HOLIDAY01084.archived
-rw-rw----+ 1 user develop 13038 Sep 19 04:04 HOLIDAY01085.archived
-rw-rw----+ 1 user develop 24212 Sep 20 05:45 HOLIDAY01086.archived
-rw-rw----+ 1 user develop 39513 Sep 21 05:14 HOLIDAY01087.archived
-rw-rw----+ 1 user develop 42394 Sep 22 07:28 HOLIDAY01088.archived
-rw-rw----+ 1 user develop 45308 Sep 23 05:47 HOLIDAY01089.archived
-rw-rw----+ 1 user develop 35002 Sep 24 05:14 HOLIDAY01090.archived
-rw-rw----+ 1 user develop 31354 Sep 25 04:47 HOLIDAY01091.archived
-rw-rw----+ 1 user develop 22381 Sep 26 09:25 HOLIDAY01092.archived
-rw-rw----+ 1 user develop 23268 Sep 27 06:09 HOLIDAY01093.archived
-rw-rw----+ 1 user develop 24923 Sep 28 02:50 HOLIDAY01094.archived
-rw-rw----+ 1 user develop 35817 Sep 29 05:16 HOLIDAY01095.archived
-rw-rw----+ 1 user develop 34055 Sep 30 06:00 HOLIDAY01096.archived
-rw-rw----+ 1 user develop 47506 Oct 1 04:56 HOLIDAY01097.archived
-rw-rw----+ 1 user develop 41333 Oct 2 03:03 HOLIDAY01098.archived
-rw-rw----+ 1 user develop 28183 Oct 3 04:06 HOLIDAY01099.archived
-rw-rw----+ 1 user develop 5092 Oct 3 04:06 HOLIDAY01100.archived
-rw-rw----+ 1 user develop 23329 Oct 5 00:01 HOLIDAY01101.archived
Thanks!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am defining an awk function (Solaris v8 ksh) of:
function firstletter {
echo "$line" | awk '{get=substr($1,1,1);print get}' | read FL
}
I am starting a wile loop with a:
for line in `cat inputfile.lst`
When I call the function from within the for loop it works great fine. From within... (4 Replies)
Discussion started by: gozer13
4 Replies
2. Shell Programming and Scripting
Hi
Can anyone please help with the following script I need - .ksh preferably?
I have external disks attached to a system that I have to label and then run the dd command on all external disk found.
I have kicked off the dd command as follows manually to see what its output is like first... (1 Reply)
Discussion started by: angusyoung
1 Replies
3. Shell Programming and Scripting
hi all,
Ive been trying to find some way of doing this for ages but i have is a shell script that activates a python search and there it no tab completion. more familliar with tcsh at the moment but i'm a newbe.
i was trying to make an easy way to browse to a list of working directories.
... (0 Replies)
Discussion started by: jvan
0 Replies
4. Shell Programming and Scripting
Hi,
We have a requirement to find the set of filenames from the group of files in a specified folder based on
(i) version number
(ii) sequence number
such that, for any given sequence number in a day only the latest version filenames have to indentified.
Below is the format of... (4 Replies)
Discussion started by: Deepakbabu
4 Replies
5. Programming
Hi,
I have an output file which has more than 1,000,000,000 lines. I am accessing this file in another C++ program. Now while accessing the output file using cin, I want to jump, say, to the 5,000,000th line directly and start accessing data from there. Is this possible? Could someone please... (4 Replies)
Discussion started by: mugga
4 Replies
6. BSD
Hi all,
I currently run an OpenSolaris (b134) server at home for share media between a few computers (all Macs at the moment). I use ZFS to mirror a couple of disks and have a couple of SMF manifests.
My background is as a user of OS X and as a user of (Open)Solaris with formal training in... (7 Replies)
Discussion started by: forquare
7 Replies
7. Solaris
Hi,
Thanks (10 Replies)
Discussion started by: rocky1954
10 Replies
8. Shell Programming and Scripting
Hi,
I am completely new to shell scripting. Basically I am wanting to create a simple while loop script to check if a network connection is available from 'netstat -a' and if its present then output a character to the serial port. I think i am nearly there.. but need some assistance.. this is... (9 Replies)
Discussion started by: zippyzip
9 Replies
9. Shell Programming and Scripting
Hi, (I am not too good in command-lines).
I am running a bash script and at some point my loop starts to run super quickly. Then, the steps after do not get processed and there is no further outpout generated. I tried with the sleep 20s option, as I thought some steps would get overlapped, but... (22 Replies)
Discussion started by: tremblayemilie9
22 Replies
10. Shell Programming and Scripting
Hi Unix forum.
I have the following requirement to add a sequence value to each record in a file but only if it meets certain conditions. Field value in pos. 1 and 2 must be '0B' or 'OA' else leave as is. Sequence value must be preserved for each OB and OA pair.
Data Before:
123
456... (5 Replies)
Discussion started by: pchang
5 Replies
LEARN ABOUT OPENDARWIN
chflags
CHFLAGS(1) BSD General Commands Manual CHFLAGS(1)
NAME
chflags -- change file flags
SYNOPSIS
chflags [-R [-H | -L | -P]] flags file ...
DESCRIPTION
The chflags utility modifies the file flags of the listed files as specified by the flags operand.
The options are as follows:
-H If the -R option is specified, symbolic links on the command line are followed. (Symbolic links encountered in the tree traversal
are not followed.)
-L If the -R option is specified, all symbolic links are followed.
-P If the -R option is specified, no symbolic links are followed. This is the default.
-R Change the file flags for the file hierarchies rooted in the files instead of just the files themselves.
The flags are specified as an octal number or a comma separated list of keywords. The following keywords are currently defined:
arch set the archived flag (super-user only)
opaque set the opaque flag (owner or super-user only)
nodump set the nodump flag (owner or super-user only)
sappnd set the system append-only flag (super-user only)
schg set the system immutable flag (super-user only)
sunlnk set the system undeletable flag (super-user only)
uappnd set the user append-only flag (owner or super-user only)
uchg set the user immutable flag (owner or super-user only)
uunlnk set the user undeletable flag (owner or super-user only)
archived, sappend, schange, simmutable, uappend, uchange, uimmutable, sunlink, uunlink
aliases for the above
Putting the letters ``no'' before an option causes the flag to be turned off. For example:
nouchg the immutable bit should be cleared
Symbolic links do not have flags, so unless the -H or -L option is set, chflags on a symbolic link always succeeds and has no effect. The
-H, -L and -P options are ignored unless the -R option is specified. In addition, these options override each other and the command's
actions are determined by the last one specified.
You can use "ls -lo" to see the flags of existing files.
DIAGNOSTICS
The chflags utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
ls(1), chflags(2), stat(2), fts(3), symlink(7)
HISTORY
The chflags command first appeared in 4.4BSD.
BSD
May 2, 1995 BSD