10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Currently using below script but echo it print the output in two line.
Input file all-vm-final-2.txt
CEALA08893 SDDC_SCUN DS_SIO_Workload_SAPUI_UAT_01 4
CEALA09546 SDDC_SCUN DS-SIO-PD5_Workload_UAT_SP1_Flash_07 4
CEALA09702 SDDC_SCUN DS-VSAN-RMP-WORKLOAD01 4
DEALA08762 SDDC_LDC... (3 Replies)
Discussion started by: ranjancom2000
3 Replies
2. UNIX for Beginners Questions & Answers
Hi All,
i want to write a shell script read below file line by line and want to exclude the lines which contains empty value for MOUNTPOINT field.
i am using centos 7 Operating system.
want to read below file.
# cat /tmp/d5
NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root"... (4 Replies)
Discussion started by: balu1234
4 Replies
3. UNIX for Beginners Questions & Answers
Input file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies
4. Shell Programming and Scripting
Hello,
I've been trying to find the answer to this with Google and trying to browse the forums, but I haven't been able to come up with anything. If this has already been answered, please link me to the thread as I can't find it.
I've been asked to write a script that pulls a list of our CPE... (51 Replies)
Discussion started by: rwalker
51 Replies
5. Shell Programming and Scripting
This is an extract from a large file. The lines that start with fc are ports on a fabric switch. In between each fc port there is information about the port.
fc2/12 is up
Port description is SEIEDISCOVER-3
Speed is 4 Gbps
fc2/13 is down (Administratively down)
fc2/14 is up
Port... (1 Reply)
Discussion started by: kieranfoley
1 Replies
6. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
7. Shell Programming and Scripting
Dear all
I want to search special string in file and then print next all line in one line until blank lines come. Help me plz for same. My input file and desire op file is as under.
i/p file:
A1/EXT "BSCABD1_21233G1" 757 130823 1157
RADIO X-CEIVER ADMINISTRATION
BTS EXTERNAL FAULT
... (7 Replies)
Discussion started by: jaydeep_sadaria
7 Replies
8. Shell Programming and Scripting
Hi consider the source file
R|field1|field2
using the print statement in awk prints it as
R field1 field2
Is there an easier way to print the whole line in its original format (i.e. with | delimiters) than doing print $1"|"$2"|"$3 ??
Thanks
Storms (1 Reply)
Discussion started by: Storms
1 Replies
9. Shell Programming and Scripting
Hi,
I have written this code
------------------------------------------------
# !/bin/ksh
i=0
while
do
j=$i
while
do
echo -e $j
#printf "%d",$j
j=`expr $j - 1`
done
echo
i=`expr $i + 1`
done
----------------------------------------------------
The ouput which... (2 Replies)
Discussion started by: rac
2 Replies
10. Shell Programming and Scripting
Hi all,
This should be very easy but I can't figure it out...
I have a file that looks like this:
@SRR057408.1 FW8Y5CK02R652T length=34
AGCAGTGGTATCAACGCAGAGTAAGCAGTGGTAT
+SRR057408.1 FW8Y5CK02R652T length=34
FIIHFF6666?=:88@@@BBD:::?@ABBAAA>8
@SRR057408.2 FW8Y5CK02TBMHV length=52... (1 Reply)
Discussion started by: kmkocot
1 Replies
BYTEPREFIX(5) File Formats Manual BYTEPREFIX(5)
NAME
byteprefix - Configuration for display of sizes
DESCRIPTION
There are two standard ways to use units in computing: base 10 (1 k = 10^3 = 1 000) and base 2 (1 K = 2^10 = 1 024). Historically, most
computer programs have used units in base 2, where 1 KB = 1 024 bytes, 1 MB = 1 048 576 bytes, etc. However, users are more likely to
expect and understand sizes in base 10, as this is the norm outside of computing.
This configuration file is a method for configuring programs (that use libkibi) to display sizes in the user's preferred style. It can be
configured through a configuration file or environment variable (which takes precedence).
When not using the "historic" style, IEC-style prefixes (KiB, MiB, etc.) are used for base 2 units, to disambiguate them from base 10 units
(kB, MB, etc.).
OPTIONS
There are three possible styles (Default: base10):
base2 Display all sizes in Base 2 with IEC prefixes.
1 KiB = 1 024 bytes.
1 MiB = 1 024 KiB = 1 048 576 bytes.
1 GiB = 1 024 MiB = 1 048 576 KiB = 1 073 741 824 bytes.
base10 Display all sizes in Base 10, except for sizes of RAM, which use base 2 with IEC prefixes.
Everything except RAM:
1 kB = 1 000 bytes.
1 MB = 1 000 kB = 1 000 000 bytes.
1 GB = 1 000 MB = 1 000 000 kB = 1 000 000 000 bytes.
RAM:
1 KiB = 1 024 bytes.
1 MiB = 1 024 KiB = 1 048 576 bytes.
1 GiB = 1 024 MiB = 1 048 576 KiB = 1 073 741 824 bytes.
historic
Display all sizes in Base 2, without IEC prefixes.
1 KB = 1 024 bytes.
1 MB = 1 024 KB = 1 048 576 bytes.
1 GB = 1 024 MB = 1 048 576 KB = 1 073 741 824 bytes.
Not recommended. This style uses base units 2 with prefixes usually associated with base 10 units. While it uses KB rather than the
SI (base 10) kB, there is no such distinction beyond the kilobyte range, and the units are ambiguous.
ENVIRONMENT
BYTEPREFIX
This environment variable will override the configured or default style. It should just contain one of the style names, listed in
OPTIONS above.
XDG_CONFIG_HOME
The location of the user's configuration files. If not set, it will be assumed to be ~/.config.
FILES
The preferred style can be set in a system-wide configuration file and/or in user's own configuration file (which will take precedence).
If no configuration file exists, the default style is base10.
/etc/byteprefix or XDG_CONFIG_HOME/byteprefix
This file should contain a single line: format=style. Lines beginning with # are treated as comments.
EXAMPLE
A user wanting base 2 display can set the following in ~/.config/byteprefix:
format=base2
SEE ALSO
units(7)
libkibi January 2011 BYTEPREFIX(5)