Posts

Showing posts with the label fold command in Linux

Featured Post

8 Ways to Optimize AWS Glue Jobs in a Nutshell

Image
  Improving the performance of AWS Glue jobs involves several strategies that target different aspects of the ETL (Extract, Transform, Load) process. Here are some key practices. 1. Optimize Job Scripts Partitioning : Ensure your data is properly partitioned. Partitioning divides your data into manageable chunks, allowing parallel processing and reducing the amount of data scanned. Filtering : Apply pushdown predicates to filter data early in the ETL process, reducing the amount of data processed downstream. Compression : Use compressed file formats (e.g., Parquet, ORC) for your data sources and sinks. These formats not only reduce storage costs but also improve I/O performance. Optimize Transformations : Minimize the number of transformations and actions in your script. Combine transformations where possible and use DataFrame APIs which are optimized for performance. 2. Use Appropriate Data Formats Parquet and ORC : These columnar formats are efficient for storage and querying, signif

The Real Command to Wrap Text in Linux

Image
Here is a command to wrap text in Linux. The wrapping means it prints it in fixed-width column. More importantly, it will not consider spaces between words. The command you need is FOLD.   Fold command in Linux Below, you will find two examples on usage of the FOLD command. These are helpful for your project where you need to write a shell script. Example-1 The following command displays a set of lines with ten characters in each line: x="aa bb cc d e f g h i j kk ll mm nn"  echo $x | fold -10 The output of the preceding code snippet is here: aa bb cc d e f g h i j kk ll m m nn ✏Related: How to Write Recursive Shell Script in Bash Terminal Example-2 As another example, consider the following code snippet: x="The quick brown fox jumps over the fat lazy dog. "  echo $x | fold -10 The output of the preceding code snippet is here: The quick brown fox jumps over the fat l azy dog. ✏References: List of complete ls commands in Linux Keep reading How to Work with Linux