10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i am having file like this
read -p 'Username: ' uservar
text='this is only a test
so please be patient
echo "$text" | sed "s/$match/&$uservar\g"
so desireble output what i want is if user type MARIA
this is only a test
so please... (13 Replies)
Discussion started by: tomislav91
2. UNIX for Dummies Questions & Answers
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
3. UNIX for Advanced & Expert Users
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 Replies)
Discussion started by: vadlamudy
4. Homework & Coursework Questions
Good Evening. I'm new to C. Can you please help me.
I'm creating an error checking function, user will input a string, this will check if the input is all alphabet or all letters only. If there is a digit or other special char, it will print Error then ask input from user again.
Here's my... (1 Reply)
Discussion started by: eracav
5. Shell Programming and Scripting
I have one thing I need advice on, and I don't know where to start so I have no sample code.
I want the user to provide input like: 1-3,6,7,9-11
When the input is like this, I want a string to be generated including all the numbers. In the example above, the string would look like:
1... (13 Replies)
Discussion started by: Tobbev
6. Shell Programming and Scripting
1_strings file contains
$ cat 1_strings
/home/Review$ cat myxml
<projected value="some string" path="/home/$USER/Src">
<few more lines >
<projected value="some string" path="/home/$USER/check">... (4 Replies)
Discussion started by: greet_sed
7. UNIX for Dummies Questions & Answers
1) I wrote a script and gave the desired permissions using "chmod 755 scriptname". Now if i edit the script file, why do i need to set the permission again? Didn't i set the permission attribute.. or if i edit the file, does the inode number of file changes?
2) I am running my unix on a server... (1 Reply)
Discussion started by: animesharma
8. Shell Programming and Scripting
Hi guys, I have a piece of snippet below which asks the user to input some numbers
if isDatasubEnabled && isReconEnabled; then
echo "1 = CGT, 2 = Subscriber, 3 = Order Monitor, 4 = Revaluations, 5 = Reconciliation, 6 = All, 7 = Exit"
elif isDatasubEnabled &&... (4 Replies)
Discussion started by: pyscho
9. UNIX for Dummies Questions & Answers
I wanna a read a line of text from standard input. The user enter data like this way
name phone_no month1_salary month2_salary
that is user enter the name ,phone no and salary of 2 months in a single line by giving spaces. I wanna add the 3rd and 4th fields ...ie add both... (4 Replies)
Discussion started by: krishnampkkm
10. Shell Programming and Scripting
I have a shell script to build components of a product. The follow snippet will explain what I am doing.
for choice in "$@" ;
case $choice in
"o") echo "Calling $choice" ; o ;;
"i") echo... (8 Replies)
Discussion started by: vino