10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How do i get the following output, irrespective of how many . 's i will have the file name.
Input:
FCBTexas_2013_12_31_16_V2.5_Masked.xml.filepart
Output:
FCBTexas_2013_12_31_16_V2.5_Masked.xml
Thank you. (6 Replies)
Discussion started by: Ariean
6 Replies
2. UNIX for Advanced & Expert Users
Hi All,
I have a fixedwidth file of length 3000. Now i want to copy a column of 4 chars i.e( length 1678-1681) to column 1127 – 1171 to the same file.
Please let me know how can i achive using a single command in fixed width file.
Also source column length is 4 chars and target column length... (4 Replies)
Discussion started by: kiranparsha
4 Replies
3. Shell Programming and Scripting
HI Guys
I have written a script using awk to split a file based on some identifier and renaming the file based on two values from specific length. ts a fixed width file.
When I am trying to fetch the values
a = substr($0,11,10)
b = substr($0,21,5);
i am getting spaces in a and b values .... (6 Replies)
Discussion started by: manish8484
6 Replies
4. Shell Programming and Scripting
Hi,
I'have a file as below
I need to replace the comma at the end of the file into ) as below
Thanks (1 Reply)
Discussion started by: dvah
1 Replies
5. Shell Programming and Scripting
I am reading a string like $/folder1/folder2/filename from a file
And I am storing it in a variable say $path.
I want to store the path within single quotes in order to use the path within a command.
if i set like path="'"$path"'"
echo $path
It is printing like ' $/folder1/folder2/filename'... (6 Replies)
Discussion started by: Shri123
6 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have a file with several lines and I need to trim and pad with spaces the data that are between position 6 and 15 included. Data in position 1 to 5 and after 15 could be anything, and should stay as they are.
For instance, the following records in a file (underscore = space)... (4 Replies)
Discussion started by: BSF
4 Replies
7. Shell Programming and Scripting
I am capturing the files in a directory to an array. I have 2 arrays with list of files in two different directories. Both the directories are supposed to have the same number of files and filenames.
I want to check that the same file exists in both the directories. After I capture the... (1 Reply)
Discussion started by: Sangtha
1 Replies
8. UNIX for Dummies Questions & Answers
Hey Everybody,
I am having much trouble figuring this out, as I am not really a programmer..:mad:
Datafile.txt
Column0 Column1 Column2
ABC DEF xxxGHI
I am running using WGET on a cronjob to grab a datafile, but I need to cut the first three characters from... (6 Replies)
Discussion started by: rickdini
6 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a 6G log , which is unusual to read and I want to minimize it by removing some part on the upper portion( around 4GB). what should i do? can you please help me?
thanks. (1 Reply)
Discussion started by: tungaw2004
1 Replies
10. UNIX for Dummies Questions & Answers
I would like to know how to trim leading zero only in certain column of of a string, example:
hdhshdhdhd000012mmmm0002abc <===== before
hdhshdhdhd 12mmmm 2abc <===== after
Thanks for your help. (2 Replies)
Discussion started by: dngo
2 Replies