Author Topic: What does this do and how does it do it??  (Read 403 times)

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8821
  • Aurum nostrum non est aurum vulgi.
What does this do and how does it do it??
« on: August 08, 2012, 01:46:09 AM »
Hello.

I am posting a simple script that (yes, I am claiming I wrote it) put together as a test for the selection of the last slot I am allocating to PCLOS users to help me test KDE 4.9.0. I currently already selected three plus another one still on invitation.

So the only and most important criteria to providing an answer is you must be willing to help me test KDE 4.9.0. If you don't want to help test KDE 4.9.0, PLEASE you don't need to post an answer.

The first successful answer ... in clear explanation will be the last tester for KDE 4.9.0 provided another correct answer is given to part 2. Part 2 is via PM. Five is a good number and I think this is as fair as I can allow for the testing to be within the limits of not being chaotic.

I have removed all my comments and notes, except for a few.

Here it is ... what does this script do and how is it done?

Code: [Select]
#!/bin/bash
#
#
#
#
#
# by Archie Arevalo
# July 29, 2012
#
# Instructions:
# On a Konsole session of ...
#
#
#
#
#
#
#
#
#
#
# Usage:
#
#

FILE="$(kdialog --getopenfilename ~)"

#
sed 's/^ *//' $FILE > $FILE-TMP1
#
cat $FILE-TMP1 | grep \( | cut -d ' ' -f1 > $FILE-TMP2
#
sed 's/$/ \\/' $FILE-TMP2 > $FILE-TMP3
#
sed '$s/.$//'  $FILE-TMP3 > $FILE
#
rm -f $FILE-TMP*
#
kwrite $FILE &

Thank you for reading.
« Last Edit: August 15, 2012, 10:44:28 PM by Archie »
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42