10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to remove leading and trailing spaces from a file using awk but somehow I have not been able to do it.
Here is the data that I want to trim.
07/12/2017 15:55:00 |entinfdev |AD ping Time ms | .474| 1.41| .581|green |flat... (9 Replies)
Discussion started by: svajhala
2. Shell Programming and Scripting
I'm a newbie to shell scripting.
Can anyone help with the below requirement ?
The leading and trailing date of a files to be removed.
I'm looking for output like... (7 Replies)
Discussion started by: shivamayam
3. Shell Programming and Scripting
I have a folder that contains many sub folders and files. This tree has to be backed up to an archive system. According to the tech support, one of the archives is failing to back up due to the possibility of trailing spaces on file and folder names. Therefore, I would like to have a script... (16 Replies)
Discussion started by: vipertech
4. 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
5. Shell Programming and Scripting
I am trying to remove trailing space from a string.
It is not working. What might be the issue with the above snippet. (7 Replies)
Discussion started by: munna_dude
6. 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
7. Shell Programming and Scripting
I'm currently writing my sql results to a file and they have trailing spaces after each field. I want to get rid of these spaces and I'm using this code:
TVXTEMP=$(echo $TVXTEMP|sed -e 's/\ //g')
It doesn't work though. I'm not familiar with sedscript, and the other codes I've found online... (6 Replies)
Discussion started by: avillanueva
8. UNIX for Dummies Questions & Answers
I have a script wherein I access each line of the file using a FOR loop and then perform some operations in each line. The problem is each line that gets extracted in FOR loop truncates trailing blank spaces and control characters (^M) that is present at the end of each line. I don't wan this to... (5 Replies)
Discussion started by: Shobana_s
9. 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
10. 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