<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.riksoft.it/wikiriks/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://www.riksoft.it/wikiriks/feed.php">
        <title>WikiRiks - linux:bash</title>
        <description></description>
        <link>https://www.riksoft.it/wikiriks/</link>
        <image rdf:resource="https://www.riksoft.it/wikiriks/_media/wiki/logo.png" />
       <dc:date>2026-04-30T01:19:22+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www.riksoft.it/wikiriks/linux/bash/bad-interpreter-no-such-file-or-directory"/>
                <rdf:li rdf:resource="https://www.riksoft.it/wikiriks/linux/bash/check-dns-propagation"/>
                <rdf:li rdf:resource="https://www.riksoft.it/wikiriks/linux/bash/compact-firefox-db-on-linux-and-speed-up"/>
                <rdf:li rdf:resource="https://www.riksoft.it/wikiriks/linux/bash/delete-every-file-except-some"/>
                <rdf:li rdf:resource="https://www.riksoft.it/wikiriks/linux/bash/delete-every-file-except-the-newest-ones"/>
                <rdf:li rdf:resource="https://www.riksoft.it/wikiriks/linux/bash/dtdns-ip-update-client"/>
                <rdf:li rdf:resource="https://www.riksoft.it/wikiriks/linux/bash/get-public-ip"/>
                <rdf:li rdf:resource="https://www.riksoft.it/wikiriks/linux/bash/prompt-on-newline"/>
                <rdf:li rdf:resource="https://www.riksoft.it/wikiriks/linux/bash/start"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://www.riksoft.it/wikiriks/_media/wiki/logo.png">
        <title>WikiRiks</title>
        <link>https://www.riksoft.it/wikiriks/</link>
        <url>https://www.riksoft.it/wikiriks/_media/wiki/logo.png</url>
    </image>
    <item rdf:about="https://www.riksoft.it/wikiriks/linux/bash/bad-interpreter-no-such-file-or-directory">
        <dc:format>text/html</dc:format>
        <dc:date>2014-09-12T13:09:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Bash: Bad interpreter: no such files or directory</title>
        <link>https://www.riksoft.it/wikiriks/linux/bash/bad-interpreter-no-such-file-or-directory</link>
        <description>Bash: Bad interpreter: no such files or directory

Scenario

When you try to run a bash script you receive this error
-bash: ./controller.sh: /bin/bash^M: bad interpreter: No such file or directory

In my case this happens systematically if I transfer bash files with</description>
    </item>
    <item rdf:about="https://www.riksoft.it/wikiriks/linux/bash/check-dns-propagation">
        <dc:format>text/html</dc:format>
        <dc:date>2014-09-12T13:10:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Check DNS propagation (useful during domain transfer)</title>
        <link>https://www.riksoft.it/wikiriks/linux/bash/check-dns-propagation</link>
        <description>Check DNS propagation (useful during domain transfer)

When a domain is pending transfer it may be useful to be notified as soon as possibile when the DNS propagates to our location, so we can reach the new server immediately. This problem is particularly important with some hosting services because you don&#039;t have access ahead of that time.</description>
    </item>
    <item rdf:about="https://www.riksoft.it/wikiriks/linux/bash/compact-firefox-db-on-linux-and-speed-up">
        <dc:format>text/html</dc:format>
        <dc:date>2016-01-20T12:43:21+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Compact Firefox DB on Linux and speed up opening</title>
        <link>https://www.riksoft.it/wikiriks/linux/bash/compact-firefox-db-on-linux-and-speed-up</link>
        <description>Compact Firefox DB on Linux and speed up opening

Mozilla Firefox uses sqlite3 DBs to store it&#039;s stuff. These DBs get fragmented because of adding and deleting rows.
That&#039;s why I made this simple script to cope with the problem.


#!/bin/bash
#
# compact-ff.sh v. 1.0.0 
# Compacts all Firefox DBs
# 
# http://www.riksoft.it
# LGPL licence
#
# Syntax: ./compact-ff.sh

# Requires sqlite3 v.10
# If you see errors like &quot;encrypted or malformed DB...&quot; it means you have to get
# a newer version of sqlit…</description>
    </item>
    <item rdf:about="https://www.riksoft.it/wikiriks/linux/bash/delete-every-file-except-some">
        <dc:format>text/html</dc:format>
        <dc:date>2014-09-12T13:17:07+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Delete every file except some</title>
        <link>https://www.riksoft.it/wikiriks/linux/bash/delete-every-file-except-some</link>
        <description>Delete every file except some

There are different solution to this task. The most common are:


rm * | grep -v [pattern to ignore]



for i in `ls * | grep -v [pattern to ignore]`
do
   do something here
done



find . ! -name u ! -name p -maxdepth 1 -type f -delete</description>
    </item>
    <item rdf:about="https://www.riksoft.it/wikiriks/linux/bash/delete-every-file-except-the-newest-ones">
        <dc:format>text/html</dc:format>
        <dc:date>2014-09-12T13:15:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Delete every file except the newest ones</title>
        <link>https://www.riksoft.it/wikiriks/linux/bash/delete-every-file-except-the-newest-ones</link>
        <description>Delete every file except the newest ones

Delete all but the most recent X files in bash is quite simple and is particularly useful for logs and backups scripts.

Delete old log files except the latest 10


rm `ls -t *.log|awk &#039;NR &gt;10&#039;`


Delete all the zip files except the newest 2.</description>
    </item>
    <item rdf:about="https://www.riksoft.it/wikiriks/linux/bash/dtdns-ip-update-client">
        <dc:format>text/html</dc:format>
        <dc:date>2017-08-28T09:31:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Bash: DtDns IP update client</title>
        <link>https://www.riksoft.it/wikiriks/linux/bash/dtdns-ip-update-client</link>
        <description>Bash: DtDns IP update client

A simple bash script to keep updated DtDns, the best free dynamic DNS service I know of.


#!/bin/bash

# RS UPDATER 1.1.0
# http://www.riksoft.it/wikiriks/linux/bash/dtdns-ip-update-client
# MIT licence

#--------- CONFIG ---------------------------
MYHOST=&quot;yourhost.darktech.org&quot;;
MYPSW=&quot;accountPass&quot;;
#--------------------------------------------


IPNEW=`wget -qO- icanhazip.com`;
IPOLD=$(cat &quot;updatednt.dat&quot; 2&gt; /dev/null);
echo $IPOLD;

if [ &quot;$IPNEW&quot; != &quot;&quot; ]; then
…</description>
    </item>
    <item rdf:about="https://www.riksoft.it/wikiriks/linux/bash/get-public-ip">
        <dc:format>text/html</dc:format>
        <dc:date>2020-06-04T17:52:02+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Bash: get public IP</title>
        <link>https://www.riksoft.it/wikiriks/linux/bash/get-public-ip</link>
        <description>Bash: get public IP

If you are behind a router you can&#039;t use ifconfig to find the public IP, but the problem can be solved easily beacause the IP can be obtained from remote servers such as

&lt;http://ifconfig.me/ip&gt;
&lt;http://icanhazip.com&gt;
&lt;http://ipecho.net/plain&gt;

You only have to choose that with quicker response time. You could even create your own webpage using PHP and</description>
    </item>
    <item rdf:about="https://www.riksoft.it/wikiriks/linux/bash/prompt-on-newline">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-27T18:13:10+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Bash prompt on new line</title>
        <link>https://www.riksoft.it/wikiriks/linux/bash/prompt-on-newline</link>
        <description>Bash prompt on new line

When you have a long path in the prompt, only few characters could be left to write the command before going on the next line.

With this prompt instead, the command starts from a new line regardless of the path length. 

Try it pasting this in a terminal</description>
    </item>
    <item rdf:about="https://www.riksoft.it/wikiriks/linux/bash/start">
        <dc:format>text/html</dc:format>
        <dc:date>2014-09-12T13:37:10+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Bash</title>
        <link>https://www.riksoft.it/wikiriks/linux/bash/start</link>
        <description>Bash

Tips and tricks about Linux Bash

(As command line and scripting language).

  See also the section Linux

----------

Table of contents
bash index</description>
    </item>
</rdf:RDF>
