Search found 17 matches

by Pecu1iar
Sun Jan 10, 2021 6:09 pm
Forum: Scripts & Bash
Topic: Need Help with a Script
Replies: 16
Views: 618

Re: Need Help with a Script

You can use the grep command to remove blank lines. The following expire text file contains some blank lines. $ od -c expired_blank_lines 0000000 T o m C l a n c y 2 \n \n F r 0000020 e d S a v a g e 4 \n \n T o m 0000040 m y F r a n k s 7 \n \n 0000055 $ The following grep command will remove the b...
by Pecu1iar
Thu Jan 07, 2021 4:45 am
Forum: Scripts & Bash
Topic: Need Help with a Script
Replies: 16
Views: 618

Re: Need Help with a Script

So, With all of your help, I've managed to get my script to do more in line of what I want. I now have a one line file name. I've adjusted my google sheet formula so that I have a file name more in line with what I like. The only problem I have now, which is not really noticeable to the outcome of t...
by Pecu1iar
Thu Jan 07, 2021 1:12 am
Forum: Scripts & Bash
Topic: Need Help with a Script
Replies: 16
Views: 618

Re: Need Help with a Script

$ od -c expired 0000000 T o m C l a n c y 2 \r \n F r 0000020 e d S a v a g e 4 \r \n T o m 0000040 m y F r a n k s 7 \n 0000054 $ Notice the "\r" represents a carriage return. Your text file has both the "\r" carriage return and "\n" newline characters. This is common...
by Pecu1iar
Wed Jan 06, 2021 10:58 pm
Forum: Scripts & Bash
Topic: Need Help with a Script
Replies: 16
Views: 618

Re: Need Help with a Script

Thank You everyone for the suggestions. I'm still trying to figure this all out. I use this same script to perform the same action with the same type of file. The only difference is that I manually maintain the "list" of names. The two lists attached to this post are actually the product o...
by Pecu1iar
Wed Jan 06, 2021 7:09 pm
Forum: Scripts & Bash
Topic: Need Help with a Script
Replies: 16
Views: 618

Re: Need Help with a Script

1, Better section https://forums.linuxmint.com/viewforum.php?f=213 2. A little help. while IFS= read -r NAME ; do echo "/home/tony/active/$NAME NewFile.gz"; done < text1.active /home/tony/active/Trial 1 NewFile.gz /home/tony/active/Tom Tucker 3 NewFile.gz /home/tony/active/Mike Melon 5 Ne...
by Pecu1iar
Wed Jan 06, 2021 5:36 am
Forum: Scripts & Bash
Topic: Need Help with a Script
Replies: 16
Views: 618

Need Help with a Script

I have a script that I'm having some trouble with. The script uses a file and copies it multiple times renaming it with a new file name from a list each time until it has been copied and renamed with every name in the list. This is the script: #!/bin/bash cd /home/tony/working while IFS= read -r nam...
by Pecu1iar
Mon Dec 07, 2020 1:15 am
Forum: Newbie Questions
Topic: [Solved] Rename a single file using a list
Replies: 2
Views: 86

Re: Rename a single file using a list

This command would do as you want: while IFS= read -r name; do cp -nv "holiday card" "$name's Holiday Card"; done < names This assumes have created these two files in the current directory: holiday card : the template file to use names : a plain text file with one name per line ...
by Pecu1iar
Sun Dec 06, 2020 9:32 pm
Forum: Newbie Questions
Topic: [Solved] Rename a single file using a list
Replies: 2
Views: 86

[Solved] Rename a single file using a list

I've searched and searched and I can not find the answer I need. I need a command to copy one individual file and rename it from a list of file names. For instance, I have an electronic holiday card named "holiday card". I want to make multiple copies renamed from my customer list so that ...
by Pecu1iar
Sat Nov 07, 2020 1:44 am
Forum: Newbie Questions
Topic: [SOLVED] Log File and Notify-send
Replies: 6
Views: 236

Re: Log File and Notify-send

... I'm trying to improve my script. First of all, the log file. Currently the log file is written so that each new line proceeds the last. Is there anyway to write the log file so that each new line precedes the last so that when i open the log file the new entries are at the top of the list? ... ...
by Pecu1iar
Sat Nov 07, 2020 1:38 am
Forum: Newbie Questions
Topic: [SOLVED] Log File and Notify-send
Replies: 6
Views: 236

Re: Log File and Notify-send

Maybe something like this? #!/bin/bash # Open a window to display running coproc zenity --info --text="Program Sync running..." # Make a log entry (most recent first) # Note: First line of log file must be "# Program Sync Log" sed -i "/# Program Sync Log/a \ $(date +'%F %T')...
by Pecu1iar
Thu Nov 05, 2020 3:32 am
Forum: Newbie Questions
Topic: [SOLVED] Log File and Notify-send
Replies: 6
Views: 236

[SOLVED] Log File and Notify-send

First of all, I would like to thank you for your help. I have a script that executes a sync. The order of the process of the script is as follows. 1. A temporary notification is sent to alert the user that sync has begun. 2. A line is written to a log file that the sync has begun. 3. A kill command ...
by Pecu1iar
Tue Nov 03, 2020 3:51 am
Forum: Newbie Questions
Topic: [SOLVED] Running script within terminal :)
Replies: 12
Views: 336

Re: Running script within terminal

Update, I moved the above script into my home folder, created a new launcher on the desktop and pointed it to the file in home, set it to open in terminal and whalla, it works.

Thanks to you all.
by Pecu1iar
Tue Nov 03, 2020 3:12 am
Forum: Newbie Questions
Topic: [SOLVED] Running script within terminal :)
Replies: 12
Views: 336

Re: Running script within terminal

OK, I'm not able to get this to open and operate in terminal like i originally wanted. I've taken your suggestions and this is the script that I was able to put together. It doesn't do exactly what I want, but the end result is the same. #!/bin/bash notify-send "Program Sync" "Program...
by Pecu1iar
Mon Nov 02, 2020 7:56 pm
Forum: Newbie Questions
Topic: [SOLVED] Running script within terminal :)
Replies: 12
Views: 336

Re: Running script within terminal

#!/bin/bash cd /home/tony/Desktop/Program echo "$(date +'%F %T') Program starting..." >> /home/tony/Desktop/Program-log java -jar Program.jar -noGui echo "$(date +'%F %T') Program complete!" >> /home/tony/Desktop/Program-log notify-send "Program" "Program complete...
by Pecu1iar
Sun Nov 01, 2020 10:26 pm
Forum: Newbie Questions
Topic: [SOLVED] Running script within terminal :)
Replies: 12
Views: 336

Re: Running script within terminal

#!/bin/bash cd /home/tony/Desktop/Program echo "$(date +'%F %T') Program starting..." >> /home/tony/Desktop/Program-log notify-send "Program" "Program starting..." java -jar Program.jar -noGui > /home/tony/Desktop/Program-output xed /home/tony/Desktop/Program-output ec...
by Pecu1iar
Sun Nov 01, 2020 6:59 pm
Forum: Newbie Questions
Topic: [SOLVED] Running script within terminal :)
Replies: 12
Views: 336

[SOLVED] Running script within terminal :)

Hello, I'm completely new to LInux. I have a script that runs a program in the background with noGui. I've scheduled this script in cron. I've made a copy of this script and placed it on my desktop. If i want to manually sync, i can click the file and the process proceeds in the background. It takes...
by Pecu1iar
Sun Nov 01, 2020 6:51 pm
Forum: Newbie Questions
Topic: [Solved] Remote desktop
Replies: 9
Views: 262

Re: Remote desktop

If you're on the same network, I've found that NoMachine works well. I also have teamviewer installed and it works well if your're wanting to connect over the internet.

Go to advanced search