10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone, I have problems with this script.
This script should check for a folder for each server in the list of the list.txt file.
The script only checks the first host, and then exits, why?
#!/bin/bash
file='/etc/list.txt'
while read line; do
echo $line
if ssh root@$line "stat /var >... (2 Replies)
Discussion started by: nashrik
2 Replies
2. Shell Programming and Scripting
i have written my shell script in notepad however i am struggling to pass the data file to be read to the script the data file is of .txt format. My target is to run the shell script from the terminal and pass 3 arguments e.g. polg@DESKTOP-BVPDC5C:~/CS1420/coursework$ bash valsplit.sh input.txt... (11 Replies)
Discussion started by: Gurdza32
11 Replies
3. Shell Programming and Scripting
Hi All,
I have one query, I managed to run script with user inputs through command line or with 1 file.
But I need to read a txt file/xml file in which user can mention multiple sets of answers and script should run for each set till it reach the EOF.
Thanks in advance
for example, the file... (3 Replies)
Discussion started by: rv_champ
3 Replies
4. Shell Programming and Scripting
I want to write a script that read the input to variable.
I want the input screen to have 2 lines, where the values already input will appear above the input line
for example if I want to input the words below:
like
love
live
life
The screen will display like this:
1. Before any input... (8 Replies)
Discussion started by: aydj
8 Replies
5. Shell Programming and Scripting
Dear Friends,
I am looking for a shell script to merge input files into one file .. here is my idea:
1st paramter would be outfile file (all input files content)
read all input files and merge them to input param 1
ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies
6. Shell Programming and Scripting
Hi All,
Do we know how to read input file within awk script and send output toanother log file. All this needs to be in awk script, not in command line. I am running this awk through crontab.
Cat my.awk
#!/bin/awk -f
function test(var){
some code}
{
}
END
{
print"test code"
} (5 Replies)
Discussion started by: random_thoughts
5 Replies
7. Shell Programming and Scripting
The scope of the shell/perl script is to read the input text file. Validate the expiry date of each certificate and send the mail to the user. The user takes action to add the new certificate to the storage file and user owns the responsibility to update the input text file with the new certificate... (5 Replies)
Discussion started by: casmo
5 Replies
8. Shell Programming and Scripting
I need shell 0r Perl script to read multiple input and do something and come out
example:
echo “ enter the host names separated by space “
read servers
foreach @servers
{ do
do something
done}
Here host names like host1 host2 host3 . . . . . . . so on
Please help me... (8 Replies)
Discussion started by: sreedhargouda
8 Replies
9. UNIX for Dummies Questions & Answers
echo "enter employee #:/c"
read employee
grep -w $employee /tmp/file.txt
when it asked me employee #, i typed employee, worked fine.
when it asked me employee #, i type ENTER, it just sit there.
if someone type in NULL or ENTER key, i want to exit out. (2 Replies)
Discussion started by: tjmannonline
2 Replies
10. Shell Programming and Scripting
Hi, I am trying to write a ftp script which will read a file for filenames and ftp those files to another server. Here's my ftp script, but it's scanning the current directory for file names.
My question is how can I pass multiple files (these files will have the name of data files that need to... (0 Replies)
Discussion started by: sajjad02
0 Replies