10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi. I'd like to remove all values in a string variable that also exist in a second variable. What is the appropriate approach to take here? I can use a 'For' loop and check each element and then populate a new string. But is there a cleaner, simpler way?
E.g. I have the following 2 variables ... (19 Replies)
Discussion started by: user052009
19 Replies
2. Shell Programming and Scripting
i have something like this...
echo "teCertificateId" | awk -F'Id' '{ print $1 }' | awk -F'te' '{ print $2 }'
Certifica
the awk should remove 'te' only if it is present at the start of the string.. anywhere else it should ignore it.
expected output is
Certificate (7 Replies)
Discussion started by: vivek d r
7 Replies
3. Shell Programming and Scripting
I want to do the next
"I don't want to go school
because I'm sick today."
I want to join these two line but only when the first line is not more than 20 characters
and ended whit nothing or a comma and the second line not more than 15.
The 20 and the 15 can be change in the script.
I know... (10 Replies)
Discussion started by: thailand
10 Replies
4. Shell Programming and Scripting
Hi All,
Pls help me out on the below,
05 LAMSZ201-ZM-MEMO2-DATE02-5 PIC X(10).
05 LAMSZ201-ZM-MEMO2-AMT02-5 PIC S9(13)V99.
05 LAMSZ201-ZM-MEMO2-TYPE02-6 PIC XXX.
05 LAMSZ201-ZM-MEMO2-DATE02-6 PIC X(10).
05 ... (2 Replies)
Discussion started by: baskivs
2 Replies
5. Homework & Coursework Questions
Write a shell program to display the position of the right - most character in a given input string.
Example :
Input : RAHUL
Output : L is in the 5th position
also tell me how to count length of string and how to find the position of specific character in left most side.
Homework... (0 Replies)
Discussion started by: shashwat2691
0 Replies
6. Shell Programming and Scripting
Write a shell program to display the position of the right - most character in a given input string.
Example :
Input : RAHUL
Output : L is in the 5th position
also tell me how to count length of string and how to find the position of specific character in left most side. (1 Reply)
Discussion started by: shashwat2691
1 Replies
7. Shell Programming and Scripting
In a bash script I've set a variable that is the directory name of where an executable lives.
the_dir=`dirname $which myscript`
which equates to something like "/path/to/dir/bin"
I need to cut that down to remove the "bin" so I now have "/path/to/dir/".
This sounds easy but as a... (2 Replies)
Discussion started by: Witty
2 Replies
8. Shell Programming and Scripting
Hi all, see i have a script that takes few arguments. first one is command we do on file, next is file (mostly txt file with lot of data) third is destination where we do something with data in file. Since im new in scripting, and im learning as i go, i need some hint how to manipulate that... (3 Replies)
Discussion started by: ajemrunner
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a file with rows of text like so :
E100005568374098100000015667
D100005568374032000000112682
H100005228374060800000002430
I need to grab just the last digits(bolded) of each line without the proceeding text/numbers.
Thanks (5 Replies)
Discussion started by: james6
5 Replies
10. Shell Programming and Scripting
Coded in my script:
#!/bin/ksh
I have a variable in the format of YYYYMMDD: $latest_bus_date_yyyymmdd
I need to create a new variable in the format of MMDDYYYY: $latest_bus_date_mmddyyyy
I want to take the information from $latest_bus_date_yyyymmdd and reformat it to be stored in the new... (2 Replies)
Discussion started by: blt123
2 Replies