# refracta.freeforums.org

place to talk about refracta

Skip to content

Welcome
Welcome to refracta You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

## script generators

If it's not on-topic, it's in here.
Post a reply
2 posts • Page 1 of 1

### script generators

by figlfdev » Mon Jul 25, 2016 5:31 am

creates a script in /usr/local/bin named yadless, which is a graphical version of less:

Code: Select all
  `echo -e '#!/bin/bash\n#### license: creative commons cc0 1.0 (public domain)\n#### http://creativecommons.org/publicdomain/zero/1.0/\nyad --text-info --editable --wrap --fontname=monospace --show-uri --maximized --listen' > /usr/local/bin/yadless ; chmod +x /usr/local/bin/yadless`

to use: find /usr/share | yadless
if you prefer the script to the one-liner that puts it in /usr/local/bin:

Code: Select all
  `#!/bin/bash
  #### license: creative commons cc0 1.0 (public domain)
  #### http://creativecommons.org/publicdomain/zero/1.0/
  yad --text-info --editable --wrap --fontname=monospace --show-uri --maximized --listen`

figlfdev
  Posts: 109
  Joined: Tue May 31, 2016 6:23 pm

Top

### Re: script generators

by fsmithred » Mon Jul 25, 2016 1:09 pm

Here's one that I used when I was learning perl. I don't recall if I wrote this or if nadir did.

Code: Select all
  `#! /usr/bin/env bash
  # create a file for a perl program
  #perl_playground="$(pwd)"
  perl_playground="/some/path/to/my-scripts"
  editor="geany"
  if [[ $# -ne 1 ]]; then
  echo "Give it a name."
  exit 1
  fi
  echo "#!/usr/bin/env perl
  # $1
  use strict;
  use warnings;
  #use diagnostics;
  use 5.012_003;
  use autodie;
  " >> "$perl_playground/$1"
  $editor "$perl_playground/$1" &
  exit 0
  `

fsmithred
  Posts: 1987
  Joined: Wed Mar 09, 2011 9:13 pm

Top

Display posts from previous:
Sort by

Post a reply
2 posts • Page 1 of 1

Return to General Nonsense

Jump to:

### Who is online

Users browsing this forum: No registered users and 0 guests

Donate Now
ProNight Style by ModphpBB3
Hosted by © 2017 FreeForums.org | Create a free forum | Powered by phpBB
A Member of the Crowdgather Forum Community
About FreeForums | Legal | Advertise Here | Investors | Contact FreeForums.org
Report Violation
suspicion-preferred