UNIX & Linux Forums - Shell Programming and Scripting

BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.
UNIX & Linux Forums - Shell Programming and Scripting
  1. List by size
    I am trying to create a script to list files by size. I was able to show a long listing before adding parameters (first comment) but nothing seems to work after trying to add them. If the first or only parameter is *-r* the output should be descending order by size, if the parameter is anything...
  2. Perl to update field based on a specific set of rules
    In the perl below, which does execute, I am having trouble with the else in Rule 3. The digit in f{8} is extracted and used to update f[55] accordinly along with the value in f[13]. There can be either - * or + before the number that is extracted but the same logic applies, that is if the value is...
  3. sed for appending a line before a pattern and after another patter.
    Hi All, I'm appending a line before a pattern and after another pattern(;) but omitting the first pattern - same as if comes duplicates before the second pattern. Also, I'm adding a word before the first pattern - Here is my file Code: ---------