10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a question regarding while loop and existence of files.
I am running under ubuntu 18.04 bionic, have around fifty video files inside the directory.
script:
for file in *.mp4
do
/root/bin/ffmpeg -i $file \
-i $(basename "${file/.mp4}").bs.srt \
-i $(basename... (12 Replies)
Discussion started by: baris35
12 Replies
2. Shell Programming and Scripting
In the bash below I am searching the filevirus-scan.log for the Infected files: 0 line (in bold) and each line for OK.
If both of these are true then the function execute is automatically called and processing starts. If both these conditions are not meet then the line in the
file is sent to the... (2 Replies)
Discussion started by: cmccabe
2 Replies
3. UNIX for Dummies Questions & Answers
I'm facing issues in executing the bash script of mine. This script will pick the latest file received and connects SFTP server and files is placed on this remote server.
Error message
Enter password:
"File movement"
sftp> cd Test
sftp> put Test_File_201309.txt
File "Test_File_201309.txt"... (6 Replies)
Discussion started by: parpaa
6 Replies
4. Shell Programming and Scripting
Hello All,
Bash Version: 4.1.10(1)
I'm trying to "verify" some user input. The User input will contain the "Absolute Path" a "Command" and any "Options"
of that Command.
For Example, say the user's input is:
user_input="/usr//local/myExample/check_process -p 'java' -w 10 -c 20"
I... (6 Replies)
Discussion started by: mrm5102
6 Replies
5. Shell Programming and Scripting
Hi I need a bash script that can search through a text file and when it finds 'FSS1206' I need to put a Letter F 100 spaces after the second instance of FSS1206
The format is the same throughout the file I need to repeat this on every time it finds the second 'FSS1206' in the file
I have... (0 Replies)
Discussion started by: firefox2k2
0 Replies
6. Shell Programming and Scripting
I am trying to create a shell that asks the user to enter their name, and compare it to my own by saying we have the same name or saying my name and that they have a nice name too. Here is my script...
#!/bin/bash-x
echo "Enter your name".
read name
if
then
echo "My name is Adam too"... (1 Reply)
Discussion started by: amaxey45
1 Replies
7. Shell Programming and Scripting
i am having a weird error on mac os x running some shell scripts. i am a complete newbie at this and this question concerns 2 scripts. one of which a friend of mine wrote (videochecker.sh) a couple weeks ago and it's been running fine on another machine.
then last week i wrote capture.sh and it... (2 Replies)
Discussion started by: danpaluska
2 Replies
8. UNIX for Advanced & Expert Users
Hi
How to prevent grep command from throwing a system trap(or returning error status) if No match is found in the specified file(s) ?
Consider this simple shell script:
#!/usr/bin/ksh
trap 'STATUS=$?;set +x;echo;echo error $STATUS at line nb $LINENO executing :\
`sed -n... (2 Replies)
Discussion started by: cool.aquarian
2 Replies
9. Shell Programming and Scripting
Hey all, I'm a fairly new shell scripter (been writing some very basic stuff for a couple of years once in a blue moon).
I have the need to start 2 or 3 processes from within a bash script when it's run then have the script kind of hang out and wait for the user to ctrl+c and when that happens... (3 Replies)
Discussion started by: jsabino
3 Replies
10. HP-UX
Hi
i have compiled and installed bash 3.2 on my hp-ux parisc
its in path /usr/local/pkg/bash/bin/bash .....When im search for this bash (through whereis bash) im not findind but other which i hve done in same procedure( gettext,m4) ..Im able to find through whereis search option
can any1... (3 Replies)
Discussion started by: vasanthan
3 Replies