Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Help with moving list of data to 2nd column of HTML file Post 303041673 by veereshshenoy on Monday 2nd of December 2019 05:41:34 AM
Old 12-02-2019
Okay

Hi Ravindra,

I have a df -h output something like this.
Filesystem Size Used Avail Use% Mounted on
udev 960M 0 960M 0% /dev
tmpfs 197M 1.8M 195M 1% /run
/dev/sda1 20G 7.6G 11G 41% /

I want that memory percent use of tmpfs system to be printed in the 2nd column of HTML file.

I am a begineer so I tried writing with awk and it was bit complex to take the particular data.

Can you help me with this

Thanks,
Veeresh Shenoy
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract data based on match against one column data from a long list data

My input file: data_5 Ali 422 2.00E-45 102/253 140/253 24 data_3 Abu 202 60.00E-45 12/23 140/23 28 data_1 Ahmad 256 7.00E-45 120/235 140/235 22 data_4 Aman 365 8.00E-45 15/65 140/65 20 data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies

2. Shell Programming and Scripting

grep data on 2nd line and 3rd column

How do I grep/check the on-hand value on the second line of show_prod script below? In this case it's a "3". So if it's > 0, then run_this, otherwise, quit. > ./show_prod Product Status Onhand Price shoe OK 3 1.1 (6 Replies)
Discussion started by: joker_789us
6 Replies

3. Shell Programming and Scripting

Moving data from a specified column/row to another column/row

Hello, I have an input file like the following: 11_3_4 2_1_35 3_15__ _16989 Where '_' is a space. The data is in a table. Is there a way for the program to prompt the user for x1,y1 and x2,y2, where x1,y1 is the desired number (for example x=6 y=4 is a value of 4) and move to a desired spot... (2 Replies)
Discussion started by: jl487
2 Replies

4. Shell Programming and Scripting

comparing column of two different files and print the column from in order of 2nd file

Hi friends, My file is like: Second file is : I need to print the rows present in file one, but in order present in second file....I used while read gh;do awk ' $1=="' $gh'" {print >> FILENAME"output"} ' cat listoffirstfile done < secondfile but the output I am... (14 Replies)
Discussion started by: CAch
14 Replies

5. Shell Programming and Scripting

Moving a column across a delimited data file

Hi, I am trying to move a column from one position to another position in a delimited file. The positions are dynamic in nature and are available by environmental variables. Also the file can have n number of columns. Example: Initial Column Position=1 Final Column Position=3 Delimiter='|' ... (2 Replies)
Discussion started by: ayan153
2 Replies

6. UNIX for Dummies Questions & Answers

Data file moving

Suppose there is a file “Text1.txt” which contains 100 lines. I need to move 1st 25 line into another file “Text2.txt” How we can do it? Suppose there is a file “Text1.txt” in which city: Bangalore is repeating N times. I need to replace Bangalore with Delhi. How we can do... (1 Reply)
Discussion started by: Rajesh1412
1 Replies

7. UNIX for Dummies Questions & Answers

List 2nd column entry from a command

How can i retrieve 2nd column only from output of "ls - l " as my output. pls help (5 Replies)
Discussion started by: upvan111
5 Replies

8. Shell Programming and Scripting

Pulling Data, Then Moving to the Next File

I'm scanning a list of emails- I need to pull 2 pieces of data, then move to the next file: Sender's Email Address Email Date I need these to be outputted into a single column- separated by a ",". Like this: Email1's Address, Email1's Date Stamp Email2's Address, Email2's Date Stamp... (4 Replies)
Discussion started by: sudo
4 Replies

9. Shell Programming and Scripting

Space moving to next column (awk HTML)

Hi I have create a report and have converted the text output to HTML but in the output there is a sentence "The transaction was aborted by the user.", the spaces between this sentence is considered as separate column. How can I overcome the same? I am providing my code, text output and... (7 Replies)
Discussion started by: Dumpi16
7 Replies

10. UNIX for Beginners Questions & Answers

Compare 1st column from 2 file and if match print line from 1st file and append column 7 from 2nd

hi I have 2 file with more than 10 columns for both 1st file apple,0,0,0...... orange,1,2,3..... mango,2,4,5..... 2nd file apple,2,3,4,5,6,7... orange,2,3,4,5,6,8... watermerlon,2,3,4,5,6,abc... mango,5,6,7,4,6,def.... (1 Reply)
Discussion started by: tententen
1 Replies
tmpfs(7FS)							   File Systems 							tmpfs(7FS)

NAME
tmpfs - memory based file system SYNOPSIS
#include <sys/mount.h> mount (special, directory, MS_DATA, "tmpfs", NULL, 0); DESCRIPTION
tmpfs is a memory based file system which uses kernel resources relating to the VM system and page cache as a file system. Once mounted, a tmpfs file system provides standard file operations and semantics. tmpfs is so named because files and directories are not preserved across reboot or unmounts, all files residing on a tmpfs file system that is unmounted will be lost. tmpfs file systems can be mounted with the command: mount -F tmpfs swap directory Alternatively, to mount a tmpfs file system on /tmp at multi-user startup time (maximizing possible performance improvements), add the following line to /etc/vfstab: swap -/tmp tmpfs - yes - tmpfs is designed as a performance enhancement which is achieved by caching the writes to files residing on a tmpfs file system. Perfor- mance improvements are most noticeable when a large number of short lived files are written and accessed on a tmpfs file system. Large com- pilations with tmpfs mounted on /tmp are a good example of this. Users of tmpfs should be aware of some constraints involved in mounting a tmpfs file system. The resources used by tmpfs are the same as those used when commands are executed (for example, swap space allocation). This means that large sized tmpfs files can affect the amount of space left over for programs to execute. Likewise, programs requiring large amounts of memory use up the space available to tmpfs. Users running into this constraint (for example, running out of space on tmpfs) can allocate more swap space by using the swap(1M) command. Another constraint is that the number of files available in a tmpfs file system is calculated based on the physical memory of the machine and not the size of the swap device/partition. If you have too many files, tmpfs will print a warning message and you will be unable to create new files. You cannot increase this limit by adding swap space. Normal file system writes are scheduled to be written to a permanent storage medium along with all control information associated with the file (for example, modification time, file permissions). tmpfs control information resides only in memory and never needs to be written to permanent storage. File data remains in core until memory demands are sufficient to cause pages associated with tmpfs to be reused at which time they are copied out to swap. An additional mount option can be specified to control the size of an individual tmpfs file system. SEE ALSO
df(1M), mount(1M), mount_tmpfs(1M), swap(1M), mmap(2), mount(2), umount(2), vfstab(4) System Administration Guide: Basic Administration DIAGNOSTICS
If tmpfs runs out of space, one of the following messages will display in the console. directory: File system full, swap space limit exceeded This message appears because a page could not be allocated while writing to a file. This can occur if tmpfs is attempting to write more than it is allowed, or if currently executing programs are using a lot of memory. To make more space available, remove unnecessary files, exit from some programs, or allocate more swap space using swap(1M). directory: File system full, memory allocation failed tmpfs ran out of physical memory while attempting to create a new file or directory. Remove unnecessary files or directories or install more physical memory. WARNINGS
Files and directories on a tmpfs file system are not preserved across reboots or unmounts. Command scripts or programs which count on this will not work as expected. NOTES
Compilers do not necessarily use /tmp to write intermediate files therefore missing some significant performance benefits. This can be remedied by setting the environment variable TMPDIR to /tmp. Compilers use the value in this environment variable as the name of the direc- tory to store intermediate files. swap to a tmpfs file is not supported. df(1M) output is of limited accuracy since a tmpfs file system size is not static and the space available to tmpfs is dependent on the swap space demands of the entire system. SunOS 5.11 9 Oct 1990 tmpfs(7FS)
All times are GMT -4. The time now is 06:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy