9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello I have two vars loaded with
$VAR1="ISOMETHING103"
$VAR2="COTHERTHING04"
I need to:
1) Strip the first char. Could be sed 's/^.//'
2) The number has it's rules. If it has "hundreds", it needs to be striped.
If it is just two digits it shouldn't.
So, for VAR1 output should be... (7 Replies)
Discussion started by: tristezo2k
7 Replies
2. Shell Programming and Scripting
i have a process that receives files similar to below. these are files obviously generated on a windows machine that are submitted to a linux cluster. the one thing they have in common is the leading c:\any-number-of-leading-dirs\filename.xxx. is there a way to re-create/modify the file to remove... (3 Replies)
Discussion started by: crimso
3 Replies
3. Shell Programming and Scripting
Ok so I know the title was probably confusing so here goes: I have a tarball (gzipped) that has a nested directory structure . For example:
my.tar.gz (contents)
---
------
---------
------------
---------------
... (2 Replies)
Discussion started by: DC Slick
2 Replies
4. Shell Programming and Scripting
Hi
i need help in adding leading zero to filenames
e.g file name in my folder are
1_234sd.txt
23_234sd.txt
the output i need is
001_234sd.txt
023_234sd.txt
can i do this shell scripting
please help (2 Replies)
Discussion started by: rsmpk
2 Replies
5. UNIX for Dummies Questions & Answers
I've many file like this
01-file
01_-_file
01_-_file
01_-_file
01_-_file
01-file
I would remove bold part from filename. Suggestions?Thanks (4 Replies)
Discussion started by: cv313x
4 Replies
6. Programming
I am new in Unix. I go through the man strip. But did not understand that, why when we have -G (debug and release ) option in the compiler, than using strip command to strip the debug information from the objects. i want to binary for teh production i will compile it without debug option. What the... (4 Replies)
Discussion started by: Saurabh78
4 Replies
7. UNIX for Advanced & Expert Users
I have created one binary with the debug option debug.out and another without it is production.out. Now, i use stripe on the debug.out.
Now, both binary will be same? or have any differences. (1 Reply)
Discussion started by: Saurabh78
1 Replies
8. Shell Programming and Scripting
Hey,
How to strip the extention from filename?
MY_XML.xml -> MY_XML
MY_TEST_FILE.txt -> MY_TEST_FILE
HELLO_WORLD.xls -> HELLO_WORLD
Thanks in advance! (2 Replies)
Discussion started by: mpang_
2 Replies
9. Shell Programming and Scripting
I am trying to strip all leading and trailing spaces of a shell variable using either awk or sed or any other utility, however unscuccessful and need your help.
echo $SH_VAR | command_line Syntax.
The SH_VAR contains embedded spaces which needs to be preserved. I need only for the leading and... (6 Replies)
Discussion started by: jerardfjay
6 Replies