Hi all. If I have a unix directory with multiple files, lets say, I have some with .dat extensions, some with .txt extensions, etc etc.
How in a script would I provide a count of all the different file types (so, the different extensions, I guess) in the directory??
So if I had:
test.dat... (6 Replies)
Hi,
I have a load of if statements that look for files in a directory, I want to be able to count them up and the total files confirmed in an email? I ahve tried expr but i this does not work and it only reads in the first if and ignores the rest.
Please see script,
#!/bin/ksh
... (2 Replies)
I'm regularly counting the number of rows in a number of files. I need to know how many rows their are in all files together. Counting rows in one file I can handle, but how do I count rows in all at once?
I'd be grateful for any answer. (7 Replies)
I've been away from Unix and the vi editor for a while, and now I'm using vi (actually vim) in a Cygwin bash shell. When I copy-and-paste code examples (I'm playing with perl now) any time I paste code with lines beginning with the # character, vi inserts a # character at the beginning of every... (2 Replies)
In a script, how would I go about finding the number of files for the first parameter after my script name?
For instance, my script name is myscript.sh and the folder I am checking is not the current working directory, lets say it's folder1.
so I type myscript.sh folder1
This script below... (2 Replies)
My folder is/app2/istech/scratch, which contain all the below files.
I need to delete the files which start from the prefixes.
dup_events_*.*
Event_*.*
New_time_*.*
New_Loc_*.*
New_Uptime_*.*
Detailed_Reason*.*
cmt_dup_*.*
Uptime_*.*
Can anyone please let me know how to write a... (3 Replies)
i need to write a shell script to "count the number of files in the current directory but without using either ls or wc command".....
please help! (1 Reply)
Shell : Bash shell
I have a text file with entries like below
srv.sr_num sr_number, atvx.ATTRIB_37 Product_Name, ktx.X_ATTRIB_52 Product_Type, mkx.created sr_created_date, nbv.sr_cat_type_cd sr_type, bkrx.sr_area sr_category, ..
frx.order_id, des.stats_name , fpxg.current_id_name, ......
.... (3 Replies)
Discussion started by: John K
3 Replies
LEARN ABOUT BSD
makedev
MAKEDEV(8) System Manager's Manual MAKEDEV(8)NAME
makedev - make system special files
SYNOPSIS
/dev/MAKEDEV device...
DESCRIPTION
MAKEDEV is a shell script normally used to install special files. It resides in the /dev directory, as this is the normal location of spe-
cial files. Arguments to MAKEDEV are usually of the form device-name? where device-name is one of the supported devices listed in section
4 of the manual and ``?'' is a logical unit number (0-9). A few special arguments create assorted collections of devices and are listed
below.
std Create the standard devices for the system; e.g. /dev/console, /dev/tty. The VAX-11/780 console floppy device, /dev/floppy, and
VAX-11/750 and VAX-11/730 console cassette device(s), /dev/tu?, are also created with this entry.
local Create those devices specific to the local site. This request causes the shell file /dev/MAKEDEV.local to be executed. Site spe-
cific commands, such as those used to setup dialup lines as ``ttyd?'' should be included in this file.
Since all devices are created using mknod(8), this shell script is useful only to the super-user.
DIAGNOSTICS
Either self-explanatory, or generated by one of the programs called from the script. Use ``sh -x MAKEDEV'' in case of trouble.
SEE ALSO intro(4), config(8), mknod(8)4.2 Berkeley Distribution May 19, 1986 MAKEDEV(8)