Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Shilpa S
Page 3 of 5
How to remove sections from each line of files in the Linux system?
In this article, we will learn to remove sections from each line of files in the Linux/Unix operating system using the cut command. The cut command is used to extract and print selected portions of each line from files. It allows you to cut specific sections of a line by byte position, character position, or field delimiters. This makes it particularly useful for processing structured text data, CSV files, and extracting specific columns from formatted output. Syntax The general syntax of the cut command is as follows − cut OPTION... [FILE]... Options ...
Read MoreHow to removes duplicate lines from a sorted file in Linux?
To remove duplicate lines from a sorted file and make it unique, we use the uniq command in the Linux system. The uniq command works as a filter program that reports and removes duplicate lines in a file. It filters adjacent matching lines from the input and gives a unique output. This command is also available in Windows and IBM i operating systems. Syntax The general syntax of the uniq command is as follows − uniq [OPTION]... [INPUT [OUTPUT]] Options Brief description of options available in the uniq command − ...
Read MoreHow to shrink or extend the size of a file in Linux?
The truncate command is used to shrink or extend the size of a file to a specified size in Linux. Unlike deletion commands, truncate cannot remove files but can modify their contents and size. When reducing file size, if the specified size is smaller than the actual size, the extra data will be permanently lost. Syntax The general syntax of the truncate command is as follows: truncate OPTION... FILE... Options Brief description of options available in the truncate command: Option Description -c, --no-create Do not ...
Read MoreHow to sort lines of text files in Linux?
The sort command in Linux is used to arrange lines of text files in a specified order. By default, it sorts lines alphabetically in ascending order, but it offers numerous options to customize the sorting behavior based on different criteria such as numeric values, months, or reverse order. Syntax The general syntax of the sort command is as follows: sort [OPTION]... [FILE]... sort [OPTION]... --files0-from=F Common Sort Options Option Description -b, --ignore-leading-blanks Ignore leading blanks when sorting -d, --dictionary-order Consider only blanks and alphanumeric ...
Read MoreHow to split or break large files into pieces in Linux?
The split command is used to divide large files into smaller, more manageable pieces in Linux systems. By default, it creates output files with 1000 lines each and uses 'x' as the filename prefix. For example, if no output filename is specified, the split files will be named xaa, xab, etc. When a hyphen (-) is used instead of an input file, the command reads data from standard input. Syntax The general syntax of the split command is as follows: split [OPTION]... [FILE [PREFIX]] Command Options Option Description ...
Read MoreHow to wrap each input line to fit in specified width in Linux?
The fold command in Linux is used to wrap each input line to fit within a specified width. This utility makes files with long lines more readable on terminals with limited screen width, as most Linux/Unix terminals default to 80 columns. When reading files with long lines, content can extend beyond the screen width, making it difficult to read without horizontal scrolling. The fold command allows users to set the maximum length of a line and performs automatic line wrapping. It was included in the first version of POSIX and remains a standard tool across Unix-like systems. Syntax ...
Read MoreList the important core components of React Native
React Native provides core components that map to native platform views. These components are essential building blocks for creating cross-platform mobile applications. Core Components Overview React Native Component Android Native View iOS Native View Web Browser Description ...
Read MoreWhat are props in react native?
Props are properties that help to modify the React Native component. The component created can be used with different parameters using props concept. With props you can pass information from one component to another and at the same time re-use the component as per your requirement. You will be familiar with props if you are well versed with ReactJS, as the same concepts follow in React Native. Props are read-only and help make components dynamic and reusable. Example 1: Props inside React Native Built-in Components Consider the Image component: The style and ...
Read MoreHow to add styling or css to your app using reactnative?
React Native provides two main approaches for styling your components: using the StyleSheet component and inline styles. Both methods allow you to apply CSS-like properties to create visually appealing mobile applications. Using StyleSheet Component The StyleSheet component is the recommended approach for styling in React Native. It provides better performance and code organization compared to inline styles. Import StyleSheet First, import the StyleSheet component from React Native: import { StyleSheet } from 'react-native'; Creating Styles Create your styles using StyleSheet.create() method: const styles = StyleSheet.create({ container: { ...
Read MoreWhat is the FlatList component and how to use it in React Native?
FlatList is a high-performance, scrollable list component in React Native that efficiently renders large datasets. It offers header and footer support, multiple column support, comes with vertical/horizontal scrolling, lazy loading, and virtualization for optimal performance. Here are some important features of FlatList: Virtualized rendering for performance optimization Scroll loading and lazy rendering ScrollToIndex support for programmatic scrolling Header and footer component support Multiple column support Cross-platform compatibility Configurable viewability ...
Read More