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
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityMany tools can rearrange text, I would use awk
:
awk -F, '{print $1" works in "$2}' file
eventually sed
:
sed 's/,/ works in /' file