I have a text file, named all.txt, with the following content:f http://www.google.com/f http://www.abc.com/c http://www.google.com/c http://www.abc.com/ I want to sort it on the URL ignoring the first 2 characters i.e f or c . To do this, Linux provides a sort command. Using the keydef option, the file can be sorted. To do so, open a … Continue reading Sort text file in Linux from a particular position
Tag: csv
Replace comma with new line in a text file using tr in Linux
If you have a CSV file and want to replace each comma with a carriage return or new line in Linux, you can do so using the tr command. Below is an illustration of how it can be done. Open a terminal window, then type the following command. $ cat mycsvfile.txt | tr ',' 'n' … Continue reading Replace comma with new line in a text file using tr in Linux
Convert India Income Tax Return XML file to CSV for use with spreadsheets
The Indian Income Tax department has been very friendly and proactive and provided income tax payers in India to file electronic returns. The returns can be filed using the respective excel spreadsheet files from https://incometaxindiaefiling.gov.in/portal/index.jsp. The ITR returns files are like actually xls spreadsheets that you need to open and fill in your tax figures. … Continue reading Convert India Income Tax Return XML file to CSV for use with spreadsheets