10 More Discussions You Might Find Interesting
1. Linux
Hello,
I need to find the date of next first Friday of the month and set as a variable in a bash script
ie -
FIRSTFRIDAY=$(date -dfirst-friday +%d)
I know date -dfirst-friday doesn't work, but unsure if I can use this / cal + awk or something else to find the right date of the... (7 Replies)
Discussion started by: summerdays
7 Replies
2. Shell Programming and Scripting
I am trying to display the text the user selects from a bash menu. The below will display the menu and allow the user to enter a number, but will not display the choice selected.
bash
while true
do
printf "\n please make a selection from the MENU \n
... (4 Replies)
Discussion started by: cmccabe
4 Replies
3. Shell Programming and Scripting
Heyas
I've been working on my project TUI (Text User Interface) for quite some time now, its a hobby project, so nothing i sit in front of 8hrs/day.
Since the only 'real' programming language i knw is Visual Basic, based upon early steps with MS-Batch files. When i 'joined' linux 3 years ago,... (7 Replies)
Discussion started by: sea
7 Replies
4. Shell Programming and Scripting
I have written the following bash function prArgv
Suppose the calling sequence is as follows
prArgv VAL1 VAL2 DESC VAL3 VAL4 v2d1 s4 p15
The call will look at the tag k1v2, add the numbers together, in this case 2+1=3
This means that the function will look at the first 3 user arguments... (1 Reply)
Discussion started by: kristinu
1 Replies
5. Shell Programming and Scripting
Hi everyone, I'm trying to write a script to format a file using unix2dos. I want to output all but the first 14 lines in a file. Then I want to pipe this to unix2dos to convert the output to a file that's easily readable on windows. Here's what I have:
export Lines=`wc -l < $1`
export... (11 Replies)
Discussion started by: LuminalZero
11 Replies
6. Shell Programming and Scripting
Hello, i have a problem with the output from my bash program.
I made this program
#!/bin/bash
BESTANDEN=$* # Plaatst bestanden in de variabele BESTANDEN
TMPFILE=xmlprog.sh.$$.$RANDOM # basisnaam voor tijdelijke bestanden
# controller of het programma correct is aangeroepen
if
then
... (6 Replies)
Discussion started by: dutchspiders
6 Replies
7. Shell Programming and Scripting
Hi all,
How to:
Run a bash script, display on the screen and save all information in a file including error information.
For example:
I have a bash script called test.sh
now I want to run the test.sh and display the output on the screen and save the output including error info to a file.
... (1 Reply)
Discussion started by: Damon sine
1 Replies
8. Shell Programming and Scripting
A Newbie here,
I am working on a script and am having problems with the else part of the script. I can't get the users who are not logged into the system to display on the screen with their username and the text "The user is not logged in". I am sure it is something simple and stupid, but I... (5 Replies)
Discussion started by: rchirico
5 Replies
9. Shell Programming and Scripting
I am looking for a way to display on a single line, a running countdown for a given amount of time in a terminal using a bash script.
I am looking for this to use as part of a larger bash script that captures Video. The script sets up a bunch of parameters for DVgrab, and one of the parameters... (11 Replies)
Discussion started by: Starcast
11 Replies
10. Shell Programming and Scripting
Hello there,
As a newbie:
The directories in PATH can be hard to distinguish when printed out as
one line with colon .Please, can i have a sample script to display
them,one to a line.
Thank you. (1 Reply)
Discussion started by: debut
1 Replies