10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am working on a script, which requests users to enter input.
Ex: read -p "Please enter your email id:" email
I don't want users skipping this entry, this has to be mandatory.I dont want to proceed without input.
I can do a check if variable $email is empty and proceed if not.But, i... (7 Replies)
Discussion started by: aravindadla
7 Replies
2. Shell Programming and Scripting
Example input:
John:Shepherd:770-767-4040:U.S.A:New York
Mo Jo:Jo Jo: 666-666-6666:U.S.A:Townsville
Expected Output:
First Name: John
Last Name: Shepherd
Phone Number: 770-767-4040
Country: U.S.A
State: New York
First Name: Mo Jo
Last Name: Jo Jo
Phone Number: 666-666-6666... (10 Replies)
Discussion started by: Camrikron
10 Replies
3. 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
4. Shell Programming and Scripting
Hi
I am new to writing script and want to use a Bash Piped while-read and read from user input.
if something happens on server.log then do while loop or if something happend on user input then do while loop.
Pseudocode something like:
tail -n 3 -f server.log | while read serverline || read... (8 Replies)
Discussion started by: MyMorris
8 Replies
5. Shell Programming and Scripting
Hi Guys,
I need to append some data to a new file, but i need to make sure that when i use to >> command again.I dont go to the new line. i append the data on the same line.
Please help regarding the same.
Thanks in advance..!!! (3 Replies)
Discussion started by: jaituteja
3 Replies
6. Shell Programming and Scripting
Can we input two variable on single line that separate by space example user input "list jpg" it will list all jpg files in current directory (3 Replies)
Discussion started by: guidely
3 Replies
7. Shell Programming and Scripting
Hi all,
My search karate must be weak because I'm about certain something very like this has been asked and answered here many times. I'll give you the exact scenario I've wasted a few hours of my Saturday on: :wall:
I'm trying to read through a very large number (~200) of router and... (28 Replies)
Discussion started by: svermill
28 Replies
8. Shell Programming and Scripting
This reads single keystrokes and produces an output:
#! /bin/bash
while : ; do
read -s -n 1 >/dev/null 2>&1
echo ${REPLY}
done | awk '{print}'
This second one don't. Even though these examples make no sense; the real code is more complicated. Who knows what the problem is... (2 Replies)
Discussion started by: elbrand
2 Replies
9. Shell Programming and Scripting
I'm reading from a file that is semi-colon delimited. One of the fields contains 2 spaces separating the first and last name (4th field in - "JOHN<space><space> DOE"):
e.g. TORONTO;ONTARIO;1 YONGE STREET;JOHN DOE;CANADA
When I read this record and either echo/print to screen or write to... (4 Replies)
Discussion started by: NinersFan
4 Replies
10. Shell Programming and Scripting
hey, i'm trying to write a shell script which accepts:
operand operator operand
then, the script would see which operator it is (using case) and calculate it...
but i dont know how to do it correctly with $1 $2 $3... (eliminating accepting separate inputs) (1 Reply)
Discussion started by: quipy
1 Replies