10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have some strings such as
They will only have letters and numbers. In each case I want to remove the last digit? The lengths will vary. So a hard coded substr won't work. What do I do?
if it doesn't end in a number, I don't want to remove any characters. (6 Replies)
Discussion started by: guessingo
2. Shell Programming and Scripting
I have file1.txt as below
expected output :
152494~~-0.49~201207... (9 Replies)
Discussion started by: i150371485
3. Shell Programming and Scripting
Hi I have a simple request but can't find the answer. I want to remove trailing zeros, and in some cases the fullstops, from the input data. Example of input file:
Desired output file would be:
... (10 Replies)
Discussion started by: theflamingmoe
4. Shell Programming and Scripting
I want to end up with:
Basically take everything before the first tab and put it in the place of the consistently named word placeholder and add a slash in place... (2 Replies)
Discussion started by: crowman
5. Shell Programming and Scripting
I'm trying to replace an alias with its match using sed but the match contains forward slashs so it causes the sed command to throw a garbled message..
I'm trying to use the below but like I say it throws a... (5 Replies)
Discussion started by: Jazmania
6. UNIX for Dummies Questions & Answers
I would prefer to use Sed, but I will do whatever necessary. I want to know a good way to remove ":" and "/" from the first string surrounded in Double quotes, but not the 2nd.
"9781238274584-Ace of Spades: The Poop" "Ace of Spades: The Poop" ...Desired:
"9781238274584-Ace of... (6 Replies)
Discussion started by: glev2005
7. Shell Programming and Scripting
I'm using this thread as an example, but can't seem to apply it to my situation.
I'm trying to strip the trailing slash (/) from an input argument. Here's a snippet of my command line input and the troublesome code:
$ script_name -s "../pathname/dir/"
snip 8< ...
while getopts :s:... (5 Replies)
Discussion started by: ricksj
8. Shell Programming and Scripting
Hello, I am trying to write a script that will calculate the amount of data remaining in a storage volume. I'm running Tru64 Unix version 5.1B patch kit 6. The script is being run against an AdvFS domain. I am programming in Korn Shell version M-11/16/88f.
The basic idea is that I want to run df... (3 Replies)
Discussion started by: Heathe_Kyle
9. UNIX for Dummies Questions & Answers
I have a file like this
(ADD_MONTHS((Substr(Trim(BOTH FROM Translate(Maximum(closeDa
I have a requirement where i need just the date.
When i do: tail -1... (2 Replies)
Discussion started by: mahek_bedi
10. UNIX for Dummies Questions & Answers
im trying to use a sed command to remove all occurenes of \p\g
what i used so far is : sed 's!\p\g!!g' file
but this doesnt work ?
Any ideas, thanks for helping. (2 Replies)
Discussion started by: seaten