Thanks for your quick response. My requirement is different.
The file contains text as follows.
The for loop has to read the file line by line and pass the string in each line to the do loop. While reading each line in the file, if the line starts with # or + or - that line should be ignored.
Moderator's Comments:
Please use CODE tags when displaying sample input, sample output, AND code segments.
I have a text file like this with hundreds of lines:
>cat file1.txt
1027123000
1027124000
1127125000
1128140000
1228143000
>
all lines are very similar and have exactly 10 digits. I want to separate the digits by twodigit and hyphens....like so,
>
10-27-12-30-00
10-27-12-40-00... (7 Replies)
Hi Folks,
I got to know from this forums on how to grep from a particular line say line 6
awk 'NR==6 {print;exit}'
But how do i grep from line 6 till the end of the file or command output.
Thanks, (3 Replies)
Hi, I'm trying to do something relatively simple.
I have a txt file that has the following kinds of lines (and many more lines):
CP19 Oahu - Maunawili Falls
CP20 Oahu - Maunawili Falls
AG12 Oahu - Maunawili Falls
CP22 Oahu - Maunawili Falls, Local area
AG14 Oahu
CP141 KZ102 Kauai -... (7 Replies)
Hi All
I have UBUNTU 10.04
I would like to run at command line the gui application that I use for finding network places and navigate shared folders or network driver.
I mean the one located under menu PLACES->NETWORK
I tried using "nautilus" but you need to know in advance which IP to give and... (2 Replies)
Hi
I would just like to ask if there is a way for UNIX to ignore/overcome the 255 character limit of the command line?
My problem is that I have a really long line of text from a file (300+ bytes) which i have to "echo" and process by adding commands like "sed" to the end of the line, like... (5 Replies)
Hello,
I have a command that show some application information. Now, I have to grep there informations, like:
# showlog | grep 1266
1266.1369866124 ::
1266.1304711286 ::
41031.1161812668 ::
41078.1301266480 ::
41641.712662564 ::
1266.333792515 ::
41462.1512661988 ::
1266.54932671... (5 Replies)
In COBOL, a hyphen can be used in a field name and in a specific program some field names would be identical to others except a suffix was added--sometimes a suffix to a suffix was used. For example, assume I am looking for AAA, AAA-BBB, and AAA-BBB-CCC and don't want to look at AAA-BBB-CCC... (7 Replies)
e.g.
File name: File.txt
cat File.txt
Result:
#INBOUND_QUEUE=FAQ1
INBOUND_QUEUE=FAQ2
I want to get the value for one which is not commented out.
Thanks, (3 Replies)
I have a file with a list of references towards the end and want to apply a grep for some string.
text ....
@unnumbered References
@sp 1
@paragraphindent 0
2017. @strong{Chalenski, D.A.}; Wang, K.; Tatanova, Maria; Lopez,
Jorge L.; Hatchell, P.; Dutta, P.; @strong{Small airgun... (1 Reply)
Discussion started by: kristinu
1 Replies
LEARN ABOUT SUNOS
dfshares_nfs
dfshares_nfs(1M) System Administration Commands dfshares_nfs(1M)NAME
dfshares_nfs - list available NFS resources from remote systems
SYNOPSIS
dfshares [ -F nfs] [-h] [server...]
DESCRIPTION
dfshares provides information about resources available to the host through NFS. The -F flag may be omitted if NFS is the first file sys-
tem type listed in the file /etc/dfs/fstypes.
The query may be restricted to the output of resources available from one or more servers.
dfshares without arguments displays all resources shared on the local system, regardless of file system type.
Specifying server displays information about the resources shared by each server. Server can be any system on the network. If no server
is specified, then server is assumed to be the local system.
The output of dfshares consists of an optional header line (suppressed with the -h flag) followed by a list of lines containing whitespace-
separated fields. For each resource, the fields are:
resource server access transport
where
resource Specifies the resource name that must be given to the mount(1M) command.
server Specifies the system that is making the resource available.
access Specifies the access permissions granted to the client systems; however, dfshares cannot determine this information
for an NFS resource and populates the field with a hyphen (-).
transport Specifies the transport provider over which the resource is shared; however, dfshares cannot determine this information
for an NFS resource and populates the field with a hyphen (-).
A field may be null. Each null field is indicated by a hyphen (-) unless the remainder of the fields on the line are also null; in which
case, the hyphen may be omitted.
OPTIONS -F nfs Specify the NFS file system type
-h Suppress header line in output.
FILES
/etc/dfs/fstypes
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWnfscu |
+-----------------------------+-----------------------------+
SEE ALSO mount(1M), share(1M), unshare(1M), attributes(5)SunOS 5.10 6 Nov 2000 dfshares_nfs(1M)