10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a file named as
FAB1_600015_CONRAD.A0_7XYZ12345.000_LT-SWET.01_LTPA25L_20110622-161429_07_WFR12345_20110622-161429_20110712-125228.data.dis
I want to generate a directory taking only the 7XYZ12345.000_WFR12345
The length and format of the Filename will be the same... (2 Replies)
Discussion started by: asheshrocky
2 Replies
2. Shell Programming and Scripting
FOLKS ,
i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one.
thanks...
Venu (3 Replies)
Discussion started by: venu
3 Replies
3. Shell Programming and Scripting
To trim 3rd field in for all the lines of a file and replace the modified string in that particular field.
For example i have a file called Temp.txt having content
Temp.txt
-----------------
100,234,M1234
400,234,K1734
300,345,T3456
----------------
So the modified file output should... (4 Replies)
Discussion started by: rpadhi
4 Replies
4. Shell Programming and Scripting
Hi all,
I've been looking for how to eliminate blank spaces in a variable or strings. I've seen several ways, using sed, awk and even python. One of them is use 'tr' command, but it does not work as I expected: For example:
echo " stuff " | tr -s " "leaves one space ahead and another... (3 Replies)
Discussion started by: AlbertGM
3 Replies
5. Shell Programming and Scripting
Hi All,
I am using trim in my code..
ID_SA_SOURCE="`echo "$data" | cut -c17-34 | tr -s " "`"
ID_SA_DEST="`echo "$data" | cut -c35-52 | tr -s " "`"
echo"$ID_SA_SOURCE";"$ID_SA_DEST";
the output is
0608166896; 3001339; contains one whitespace between the two ..how can i remove that single... (3 Replies)
Discussion started by: scorpio
3 Replies
6. Shell Programming and Scripting
Hello,
I am passing a filename to a script to draw parameters from it. However, I want to use part of the filename as a parameter. The filename is transfer_ccf_3731_10.sh but I only need the 3731_10 part of it.
Is this possible? Any help or suggestions would be appreciated!
Regards,
J. (4 Replies)
Discussion started by: JWilliams
4 Replies
7. Shell Programming and Scripting
Hi Friends,
Can any one help with this issue:
How to trim spaces for each line at the end,
Like I have a file in this format.
EMP1 SMITH 46373 5 STREET HOWARD 74636
EMP2 JONES 5454 { these are spaces ........}
EMP3 SMITH 46373 5 STREET HOWARD 74636
EMP4 JON 2554 { these are... (1 Reply)
Discussion started by: sbasetty
1 Replies
8. Shell Programming and Scripting
All,
I'm a newbie at shell scripting and regular expressions and I just need to take a file that's arranged like the one below, remove all leading and trailing whitespace and add a line break after each word. I've been able to remove a few spaces using various awk, sed and Perl scripts, but... (7 Replies)
Discussion started by: moose1
7 Replies
9. Shell Programming and Scripting
Hello folks,
Is there a simple way to trim trailing spaces from each line a file. Please let me know.
Regards,
Tipsy. (5 Replies)
Discussion started by: tipsy
5 Replies
10. Shell Programming and Scripting
I'm trying to find a command that will trim the white space off a string.
e.g.
$str = " stuf "
$str = trim ( $str )
echo $str // ouput would just be stuf
Thanks, Mark (4 Replies)
Discussion started by: msteudel
4 Replies