Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How i can place in a log file an automatic chrome opener? Post 303037387 by Oltrix on Wednesday 31st of July 2019 05:00:15 AM
Old 07-31-2019
How i can place in a log file an automatic chrome opener?

Okay, so i have this problem, i have a raspberry with rasbian lite (now i have openbox running on) and i do a few script for my client. But i have a question and a problem.... i got the logs file, that file need to open automatically the browser without having to do all the steps again at the next startup(i run this bash file every start up automatically)




thats my script (im from italy ):

Code:
#!/bin/bash
clear

if [ -f logs.sh ];
        then echo "sarai reindirizzato alla tua pagina di default di "; cat logs.sh
        exit 0

fi



echo "Da che scuola provieni?"
sleep 1
echo "Sono disponibili queste opzioni:"
sleep 1
echo "[1] CPC Belli"
echo "[2] CPT Locarno"
echo "[3] CPC Chiasso"
echo "[4] SPSE Tenero"
sleep 1
testo="Okay ora verrai reindirizzato nel sito web di"
echo "Inserisci il numero della scuola che frequenti:"
read NUM
case $NUM in

1)      echo "$testo CPC Bellinzona"
        chromium-browser £INTERNET WEBSITE£
        ;;
2)      echo "$testo CPT di Locarno"
        chromium-browser £INTERNET WEBSITE£
        ;;
3)      echo "$testo CPC di Chiasso"
        chromium-browser £INTERNET WEBSITE£
        ;;
4)      echo "$testo SPSE Tenero"
        chromium-browser £INTERNET WEBSITE£
        ;;
*)      echo "La tua scuola non è presente in lista"
esac
echo "chromium-browser $NUM" >> logs.sh
exit 0

this is the error, its not a error but i dont know how to set in default the person choise in the case
Code:
sarai reindirizzato alla tua pagina di default di $1

i know im bad in English but please help me!!!!
 

9 More Discussions You Might Find Interesting

1. Solaris

Automatic Log files to my E-mail.

Hi, I have 6 servers, I want to make a script to read the messages (/var/adm/messages) file daily in the morning and send it automatically to my E-mail address. Regards (2 Replies)
Discussion started by: adel8483
2 Replies

2. Shell Programming and Scripting

ksh - truncate a log in place, sed -i not available captain!

Hi there:) Because of security requirements, It would be much better if I could truncate my logs in place using sed -i (or ?). I cant use the -i option on sed in my environment. Can anyone help a DBA? (5 Replies)
Discussion started by: quigley007
5 Replies

3. Shell Programming and Scripting

editing file in place

Is in Unix a tool that could do this: paste -d":" 'file1' 'file2' | special_save "file1" # so that file1 would be treated in a way that would prevent problems with race condition I know it normally doesn't work but is there any intelligent way how to avoid using temporary file? I know methods... (6 Replies)
Discussion started by: MartyIX
6 Replies

4. Solaris

What is the best way to copy data from place to another place?

Dear Gurus, I need you to advice or suggestion about the best solution to copy data around 200-300G from serverA(location A) to serverB(location B). Normally, I will share folder and then copy but it takes too long time(about 2 days). Do you have any suggestion or which way should be... (9 Replies)
Discussion started by: unitipon
9 Replies

5. UNIX for Dummies Questions & Answers

Changing default PDF opener

Hi, I want to open a pdf file in my PCLinuxOS, but when I click on the PDF file to open it, a message box prompts asking for Open With : KGhostView ; Save File....etc. So the default pdf genereator to open is set to KGhostView. How do I change the default to KPdf, another pdf generator.. ... (3 Replies)
Discussion started by: anaigini45
3 Replies

6. Shell Programming and Scripting

Read from file specific place in file using inode

Hello, I am using tcsh on AIX. I would like to write a script that does the following: 1. given an inode, how do I find exactly the name of the file? I know I could do this using ls -i | grep <inode> but it returns: <inode> <filename>. I need some string manipulation or something to... (1 Reply)
Discussion started by: lastZenMaster
1 Replies

7. Shell Programming and Scripting

Automatic Email of Log Files in OSX

Hi, I am trying to write a shell script that will take the log files from a single folder (all ending with .log), put them into an archive, use something to encrypt the file, and then emailx to email the resulting encrypted archive to me. Of course, I am open to suggestions on how to improve... (1 Reply)
Discussion started by: DotNaBox
1 Replies

8. Shell Programming and Scripting

Check file availability and place flag file

I have to check a directory on Linux (via shell Script which I am trying to build) for about 20 different source files with file patterns and if the files are made available in the directory, I should place flag files for which my other ETL jobs are waiting on to kick off. If the source files are... (6 Replies)
Discussion started by: dhruuv369
6 Replies

9. Shell Programming and Scripting

Search for a file in all directories and place the file in that directory

Hi All, Daily I am getting the updated file. I have to search for this file in all directories and sub directories. If the file existed in a particular directory then move this updated file to that particular directory. If the file is not existed in any of the directories then place this... (4 Replies)
Discussion started by: ROCK_PLSQL
4 Replies
MERGELOGS(1)						      General Commands Manual						      MERGELOGS(1)

NAME
mergelogs - merge and consolidate web server logs SYNOPSIS
mergelogs -p penlog [-c] [-d] [-j jitter] [-t seconds] server1:logfile1 [server2:logfile2 ...] EXAMPLES
mergelogs -p pen.log 10.0.0.1:access_log.1 10.0.0.2:access_log.2 mergelogs -p pen.log 10.0.18.6:access_log-10.0.18.6 10.0.18.8:access_log-10.0.18.8 DESCRIPTION
When pen is used to load balance web servers, the web server log file lists all accesses as coming from the host running pen. This makes it more difficult to analyze the log file. To solve this, pen creates its own log file, which contains the real client address, the time of the access, the target server address and the first few bytes of the requests. Mergelogs reads pen's log file and the log files of all load balanced web servers, compares each entry and creates a combined log file that looks as if the web server cluster were a single physical server. Client addresses are replaced with the real client addresses. In the event that no matching client address can be found in the pen log, the server address is used instead. This should never happen, and is meant as a debugging tool. A large number of these indicates that the server system date needs to be set, or that the jitter value is too small. You probably don't want to use this program. Penlog is a much more elegant and functional solution. OPTIONS
-c Do not cache pen log entries. The use of this option is not recommended, as it will make mergelogs search the entire pen log for every line in the web server logs. -d Debugging (repeat for more). -p penlog Log file from pen. -j jitter Jitter in seconds (default 600). This is the maximum variation in time stamps in the pen and web server log files. A smaller value will result in a smaller pen log cache and faster processing, at the risk of missed entries. -t seconds The difference in seconds between the time on the pen server and UTC. For example, this is 7200 (two hours) in Finland. server:logfile Web server address and name of log file. AUTHOR
Copyright (C) 2001-2003 Ulric Eriksson, <ulric@siag.nu>. SEE ALSO
pen(1), webresolve(1), penlog(1), penlogd(1) LOCAL MERGELOGS(1)
All times are GMT -4. The time now is 09:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy