I have two variables to be dynamically defined in my shell script
variable1= myfile.txt
variable2= myfile
The second variable depends on the first ( i mean , it is a part of the first variable) Now, I need to strip out the ".txt" part from the first variable how do i do that in a shell script. (2 Replies)
I have written a shell script and in my script i have a variable
filename=myfile.txt
now, i want another variable to be defined for which i have to strip out the extension fo the file name,
i.e. newvariable= myfile
how do i strip out the ".txt" part from my first variable.
Any kind of help... (4 Replies)
I posted this already in another thread, but was told that I should create a seperate thread for the following question:
How do I strip the extension when the delimiter might occur multiple times in the filename?
For example:
I have 2 files as input for my script.
test.extension... (8 Replies)
unix program to which a directory name will be passed as
parameter. This directory will contain files with various
extensions. This script will create directories with the names of the
extention of the files and then put the files in the
corresponding folder. All files which do not have any... (2 Replies)
Well my last assignment came and i tried some things but i guess it's pretty puzzling for me to figure out all the points of the problem. I was able to achieve something but it's not complete.
1. The problem statement, all variables and given/known data:
Write a bash program which strips the... (5 Replies)
Dear experts,
my problem is pretty tricky.
I want to change a file (see attached input.txt), according to another file (help.txt). The output that is desired is in output.txt. The example is attached.
Note that
-dashes should not be treated specially, they are considered normal characters,... (2 Replies)
Hi all,
I didn't use SED for 20 years and was never an expert. So my current knowledge is about zero. Please be patient with me. I'm neither a native speaker.
I have a huge dictionary file and want the rest of the lines stripped. Everything after (and including) the "/" should be stripped. I... (2 Replies)
Hi All,
I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing.
1.I need to display the .done files from the directory.
2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory
... (2 Replies)
I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)