Here's the command I'm running:
# echo "hi" | awk '{etime = system("hostname") ; close("hostname") ; print etime""}'
And here's the ouput:
server.domain.tld
0
Why in the world is that second line, the one that's just "0", there? Many thanks in advance. (2 Replies)
I have used m4 in the past to generate source code where aesthetics and space were of no consequence . Now I am using it to generate script and program templates .
So here is an excerpt from my m4 file for producing a generic bash script:
dnl `$Id$'
define(`START_SCRIPT',`#!/bin/bash... (8 Replies)
Hi, I'm using a while-loop in an awk script. If it matches a regular expression, it prints a line. Unfortunately, each line that is printed in this loop is followed by an extra character, "1".
While-statement extracted from my script:
getline temp;
while (temp ~ /.* x .*/) print temp... (3 Replies)
Hi,
I have a .csv file which as empty lines with comma and some special characters in 3rd column as below.
Source data
1,2,3,4,%#,6
,,,,,,
1,2,3,4,5,6
Target Data
1,2,3,4,5,6I need to remove blank lines and special charcters
I am trying to get this using the below awk
awk -F","... (2 Replies)
Hi,
Since today, with csh or tcsh, if I do 'ls files* > list',
every lines end with an extra space!
What happenned?
What can I do to go back when there was no extra space?
If I change to bash, there's no extra space.
Thanks,
Patrick
---------- Post updated at 03:19 PM... (1 Reply)
Hi Gurus,
I have a file which contains some special char or space.
when using cat -evt I can see the file as following:
0,"0000","abc/def aaa ... (6 Replies)
I created a awk state to calculate the number of success however when the query runs it has a leading zero. Any ideas on how to remove the leading zero from the calculation?
Here is my query:
cat myfile.log | grep | awk '{print $2,$3,$7,$11,$15,$19,$23,$27,$31,$35($19/$15*100)}'
02:00:00... (1 Reply)
Hello,
I have a requirement where i have to spool some data to a file. i have achived the desired target but m facing one issue. i have attached the script and the output.
i checked the data length in the table but it is only 45 for column 1.
can you tell me how to remove these extra... (4 Replies)
Hi All
I am trying to perform the below operation -count=`cat abc.txt | wc -l`
echo$count
5
Head=Start"$DATE"00000"$count"File
echo $HEAD
START15020300000 5File
There is a space coming before 5 which is not needed . How to ignore that . (4 Replies)
I have a data file d0 that looks like this:
$cat d0
server1 running -n-cv- 8G 3.1% 1435d 15h
server2 running -n---- 8G 39% 660d 22h
server3 running -n--v- 8G 2.5% 1173d 6h
server4 running -n---- 8G 1.1% 1048d 20h... (2 Replies)
Discussion started by: jake0391S
2 Replies
LEARN ABOUT SUNOS
ramdisk
ramdisk(7D) Devices ramdisk(7D)NAME
ramdisk - RAM disk device driver
SYNOPSIS
ramdisk@0:diskname
DESCRIPTION
The ramdisk driver supports numerous ramdisk devices that are created by the system during the boot process (see boot(1M)) or during nor-
mal system operation (see ramdiskadm(1M) for more information).
DEVICE SPECIAL FILES
Each ramdisk can be accessed either as a block device or as a raw device. When accessed as a block device, the normal buffering
mechanism is used when reading from and writing to the device, without regard to physical disk records. Accessing the ramdisk as a raw
device enables direct transmission between the disk and the read or write buffer. A single read or write call usually results in a single
I/O operation, meaning that raw I/O is more efficient when many bytes are transmitted. You can find block files names in /dev/ramdisk. Raw
file names are found in /dev/rramdisk.
There are no alignment or length restrictions on I/O requests to either block or character devices.
ERRORS
EFAULT The argument features a bad address.
EINVAL Invalid argument. EIO. An I/O error occurred.
EPERM Cannot create or delete a ramdisk without write permission on /dev/ramdiskctl.
ENOTTY The device does not support the requested ioctl function.
ENXIO The device did not exist during opening.
EBUSY Cannot exclusively open /dev/ramdiskctl. One or more ramdisks are still open.
EEXIST A ramdisk with the indicated name already exists.
EAGAIN Cannot allocate resource for ramdisk. Try again later.
FILES
/dev/ramdisk/diskname
Block device for ramdisk named diskname.
/dev/rramdisk/diskname
Raw device for ramdisk name diskname
/kernel/drv/ramdisk
32-bit driver
/kernel/drv/ramdisk.conf
Driver configuration file. (Do not alter).
/kernel/drv/sparcv9/ramdisk
64-bit driver
ATTRIBUTES
See attributes(5) for descriptions of the following attribute:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO ramdiskadm(1M), fsck(1M), fstyp(1M), mount(1M), newfs(1M), driver.conf(4), filesystem(5), dkio(7I)NOTES
The percentage of available physical memory that can be allocated to ramdisks is constrained by the variable rd_percent_physmem. You can
tune the rd_percent_physmem variable in /etc/system. By default, the percentage of available physical memory that can be allocated to
ramdisks is fixed at 25%.
A ramdisk may not be the best possible use of system memory. Accordingly, use ramdisks only when absolutely necessary.
SunOS 5.10 04 Mar 2003 ramdisk(7D)