10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: cmccabe
1 Replies
2. Shell Programming and Scripting
Thanks to people's help, I have composed a single line within a .sh script that Ports a file into a csv:
perl -p -i -e... (5 Replies)
Discussion started by: Astrocloud
5 Replies
3. Shell Programming and Scripting
Further to my earlier question regarding embedded commands I now want to delete then replace the last line in a file in memory....
FILEHERE=$((echo "$FILEHERE" | sed -e '$d' ) echo "this now added")
this is throwing a syntax error but as I'm still getting used to this structure I... (1 Reply)
Discussion started by: Bashingaway
1 Replies
4. Shell Programming and Scripting
Hi
Following is an example line.
echo "192.22.22.22 \"33dffwef\" 200 300 dsdsd" | sed "s:\(\ *\ \):\1:"
I want it's output to be
200
However this is not the case. Can you tell me how to do it? I don't want to use AWK for this. Secondly, how can i fetch just 300? Should I use "\2"... (3 Replies)
Discussion started by: shahanali
3 Replies
5. Shell Programming and Scripting
Hi,
I have a flat text file consisting of rows (each field separated by '|') from a table. e.g;
NSW|Gulliver Travels|236||5000|BW
This has to be converted to the following format
NSW "Gulliver Travels" 236 5000 BW
No data field has to be left as a blank character so that we have... (6 Replies)
Discussion started by: vharsha
6 Replies
6. Shell Programming and Scripting
Hey there - a bit of background on what I'm trying to accomplish, first off. I am trying to load the data from a pipe delimited file into a database. The loading tool that I use cannot handle embedded newline characters within a field, so I need to scrub them out.
Solutions that I have tried... (7 Replies)
Discussion started by: bbetteridge
7 Replies
7. Shell Programming and Scripting
Hi,
Say I have this text file <copy.out> that contains a list of files/directories to be copied out to a different location.
$ more copy.out
dir1/file1
dir1/file2
dir1/file3
"dir1/white space"
dir1/file4
If I do the following:
$copy=`more copy.out`
$echo $copy
dir1/file1... (4 Replies)
Discussion started by: 60doses
4 Replies
8. Shell Programming and Scripting
I have a file in which I clean out a bunch of nonsense text as well as path information.
What I end up with is something like the following:
johnson.........................................................933
Where the periods represent the whitespace
The file comes out originally with... (2 Replies)
Discussion started by: roninuta
2 Replies
9. AIX
Hi guys,
I have a directory in UNIX having files with the below format, i need to pickup the latest file having recent timestamp embedded on it, then need to rename it to a standard file name.
Below is the file format:
filename_yyyymmdd.csv, i need to pick the latest and move it with the... (2 Replies)
Discussion started by: kaushik25
2 Replies
10. Shell Programming and Scripting
Hi All
I want a method in shell script which will embed the exe file into rtf file si that the rtf file can be open in word and so my exe.
Actually what is happening in my system at present :
The report in my system is a self-extracting Zip file with filetype '.EXE'. Double clicking... (1 Reply)
Discussion started by: rawatds
1 Replies