Search Results

Search: Posts Made By: nightrider
2,507
Posted By nightrider
Hello! The files do not follow any...
Hello!

The files do not follow any convention. It's from the mapping file that the unix script should find the physical file and group .

In my head, I would reckon the pseudo code will go like...
2,507
Posted By nightrider
Hi, By a mapping file I would need to group...
Hi,

By a mapping file I would need to group them.
2,507
Posted By nightrider
I am using 4 files as an illustration of what I...
I am using 4 files as an illustration of what I am trying to achieve. In actual fact I have ard 5000 files
2,507
Posted By nightrider
Group files and zip
Hi I have 4 files in a folder and I am supposed to group and zip them via a mapping file as such:

Group. Filename
1. A.txt
1. B.txt
2. C.txt
2. D.txt

Result...
1,928
Posted By nightrider
Oh....... this is what i meant I have a...
Oh....... this is what i meant

I have a filename


ABC DEF.txt


And it printed with

ABC DEF.txt
1,928
Posted By nightrider
File name has double spacing, but after print it's gone
Hi,
I am writing this script to find all files in a directory and print the filepath, date and file size.

However, it doesnt seem to preserve double spacing file with this script. I would...
3,436
Posted By nightrider
Split a string with bracket
Hi,

Am trying to split a string with bracket in ksh but it is not splitting it correctly.

split("Hello, Name(1), Name(2)", main,",");

How do i split correctly?
1,956
Posted By nightrider
Stitch 2 files together by columns
How do i append the columns of 1 file to another?

Suppose I have file1:
col1 col2 col3

And file2:
col4 col5 col6

Is there a script to generate a final file with:
col1 col2 col3 col4...
3,012
Posted By nightrider
Yoz Tyler, no problem with the TAB. Cant thank...
Yoz Tyler, no problem with the TAB. Cant thank you enuf for the code already, how can i fuss over the formatting. :p

Anyway, I am executing your code, it seems like my system not able to parse...
3,012
Posted By nightrider
Yes Tyler. There will be a desired coLumn header....
Yes Tyler. There will be a desired coLumn header. And the script will have to fix gaps as well as order.

I don't know how to do this in a single unix script, is this even possible?

If not then...
3,012
Posted By nightrider
Hi Tyler, Appreciate your prompt reply. What...
Hi Tyler,
Appreciate your prompt reply.
What if I don't know beforehand the columns that were missing? Will your code still work?

I was using for loop in my earlier posting to perform a column...
3,012
Posted By nightrider
This is what I have got so far. abc.txt: ...
This is what I have got so far.

abc.txt:
NAME1 NAME2 ADDRESS TEL
A B ADD 1234

awk -F"\t" '
NR==1{
for(i=1;i<=NF;i++)
if($i~/ID/)f[n]=i
n++
for(i=1;i<=NF;i++)
if($i~/NAME1/)f[n]=i
n++...
3,012
Posted By nightrider
Extract columns from a file if the name dont exist put blank
Hi,

I am very new to Unix script. Suppose i have a file with column header:
NAME1 NAME2 Address Tel

And I always need to make a file with column header:
ID NAME1 NAME2 EMail Address Tel
...
Showing results 1 to 13 of 13

 
All times are GMT -4. The time now is 07:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy