This is what I get when I run the script. The awk command is not passing back "This Is A Test". Its passing back only single words, so my script its trying to delete the wireless "This", "Is", "A", "Test" that don't exist. (Ignore the "preferred networks on en1")
Code:
Lord:Desktop administrator$ sudo ./wireless\ clean\ up.sh
Deleting Preferred
Network Preferred was not found in the preferred networks list
Deleting networks
Network networks was not found in the preferred networks list
Deleting on
Network on was not found in the preferred networks list
Deleting en1:
Network en1: was not found in the preferred networks list
Deleting This
Network This was not found in the preferred networks list
Deleting is
Network is was not found in the preferred networks list
Deleting a
Network a was not found in the preferred networks list
Deleting test
Network test was not found in the preferred networks list
Network This is a test is already in the preferred networks list
Lord:Desktop administrator$
I have to do a directory clean up on several machines. The task is as follows:
go to a particular directory (cd /xxx)
1. create a directory ' SCRIPTCLEANUP ' ( i KNOW IT)
loop through
2. List the directory
3. if directory and start with 'DQA' leave it,
4. if directory or file move it to... (0 Replies)
I have a script which would monitor a given directory and delete any files which are older than 10 days. I was going to set the 10 crob jobs to perform this operation for 10 different directories (some are actually sub-directories), but my boss doesn't like that idea, so I need to do that in one... (1 Reply)
I need to know how I would be able to clean out the trash can of a single "dumb" user every time the MAC is turned on.
Back ground.
OS 10.3x
G3 Mac
Two users configured...
1) Root or Admin (superuser)
2) student (Simple no access to anything but shared folder for files etc.)
The problem... (4 Replies)
Hello guys,
this script partially works but it's still pretty ugly and, moreover, if the month is jan/feb/mar... it doesn't work at all.
Could anyone say me how to correct, cut and clean a little bit?
#!/usr/bin/ksh
egrep -v -e "^\s*#" /file/permission | awk '{ print $1 }' | sort | uniq... (3 Replies)
Hi,
nevermind. I think I've found the answer. It appears I was looking for index, match, sub, and gsub.
I want to write a shell script that will clean the html out of a bunch of files and format the data for import into excel.
Awk seems like a powerful tool, but it seems oriented to... (1 Reply)
Hi i need a unix script to do the following tasks.
My folder structure is /home/MSTR/test and will have the following folder within it
Cache
Lookup
Source
Target
1. On the Source & Target folder i have to take a copy of files older than 5 days and move(FTP) it into local machines C:\Backup... (1 Reply)
Hi,
I would like to clean up by unix mail mail box thru some script command.. I do know how to delete from mail box ...
e.g.
$ mail
? d*
? quit
But I need to clean up thru some command which I can use in my script before sending any email..
Thanks in advance! (1 Reply)
Hello All,
I need a script that would delete files which are more than "X" number of days old, also if there can be a log file of the deleted files for reference.
I am from windows background hence finding it difficult. Any help is much appreciated
Regards
Wert (4 Replies)
In the f1 file below I am trying to clean it up removing lines the have _tn_ in them. Next, removing the characters in $2 before the ninth /. Then I remove the ID_(digit- always 4). Finally, the charcters after and including the first _. It is curently doing most of it but the cut is removing $1... (5 Replies)
Discussion started by: cmccabe
5 Replies
LEARN ABOUT SUNOS
networks
networks(4) File Formats networks(4)NAME
networks - network name database
SYNOPSIS
/etc/inet/networks
/etc/networks
DESCRIPTION
The networks file is a local source of information regarding the networks which comprise the Internet. The networks file can be used in
conjunction with, or instead of, other networks sources, including the NIS maps networks.byname and networks.byaddr and the NIS+ table
networks. Programs use the getnetbyname(3SOCKET) routines to access this information.
The network file has a single line for each network, with the following information:
official-network-name network-number aliases
Items are separated by any number of SPACE or TAB characters. A `#' indicates the beginning of a comment. Characters up to the end of the
line are not interpreted by routines which search the file. This file is normally created from the official network database maintained at
the Network Information Control Center (NIC), though local changes may be required to bring it up to date regarding unofficial aliases
and/or unknown networks.
Network numbers may be specified in the conventional dot (`.') notation using the inet_network routine from the Internet address manipula-
tion library, inet(7P). Network names may contain any printable character other than a field delimiter, NEWLINE, or comment character.
SEE ALSO getnetbyaddr(3SOCKET), getnetbyname(3SOCKET), inet(3SOCKET), nsswitch.conf(4), inet(7P)NOTES
The official SVR4 name of the networks file is /etc/inet/networks. The symbolic link /etc/networks exists for BSD compatibility.
The network number in networks database is the host address shifted to the right by the number of 0 bits in the address mask. For example,
for the address 24.132.47.86 that has a mask of fffffe00, its network number is 803351. This is obtained when the address is shifted right
by 9 bits. The address maps to 12.66.23. The trailing 0 bits should not be specified. The network number here is different from that
described in netmasks(4). For this example, the entry in netmasks would be 24.132.46.0 fffffe00.
SunOS 5.10 17 Jan 2002 networks(4)