1

For eg i have a file called test.csv containing

emp1,dep1
emp2,dep2
emp3,dep1
emp4,dep3
emp5,dep2

expected output is

emp1 works in dep1
emp2 works in dep2
.
.
emp5 works in dep2 

1 Answer 1

0

Many tools can rearrange text, I would use awk:

awk -F, '{print $1" works in "$2}' file

eventually sed:

sed 's/,/ works in /' file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.