10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
We have a csv file as mentioned below and the requirement is to change the date format in file as mentioned below.
Current file (file.csv)
----------------------
empname,date_of_join,dept,date_of_resignation
ram,08/09/2015,sales,21/06/2016
"akash,sahu",08/10/2015,IT,21/07/2016
... (6 Replies)
Discussion started by: gopal.biswal
6 Replies
2. Shell Programming and Scripting
Hi All,
I have my data like below
"1","abc,db","hac,aron","4","5"
Now I need to extract 1,2,4th columns
Output should be like
"1",abc,db","4"
Am trying to use cut command but not able to get the results.
Thanks in advance. (4 Replies)
Discussion started by: weknowd
4 Replies
3. Shell Programming and Scripting
Hi all,
I have a number of strings like below:
//mnt/autocor/43°13'(33")W/
and i'm trying to get the numbers in this string, for example
431333
please help
thanks ahead (14 Replies)
Discussion started by: sunnydanniel
14 Replies
4. Shell Programming and Scripting
Hello,
I have got a log file and would need to write a script to cut the every first and second fields of every third line.
Job Name : dummytextd_v1
Status : KILLED
TIMEDOUT 2011-05-01 05:33
Job Name : dummyttx_v1
Status : KILLED
TIMEDOUT 2011-05-03 02:33
Job Name :... (4 Replies)
Discussion started by: Kochappa
4 Replies
5. Shell Programming and Scripting
Hi, all
I need to get fields in a line that are separated by commas, some of the fields are enclosed with double quotes, and they are supposed to be treated as a single field even if there are commas inside the quotes.
sample input:
for this line, 5 fields are supposed to be extracted, they... (8 Replies)
Discussion started by: kevintse
8 Replies
6. Shell Programming and Scripting
Hi Guys,
I have following script which counts number of tilde in file but i want to count tilde which are field saparator.but my script count tilde between word also what i need is if line is like
abcd~das~1212~fsddf~ so tilde count is = 4
if line like
abcd~das~1212~fsd"~"df~ so tilda count... (4 Replies)
Discussion started by: Ganesh Khandare
4 Replies
7. Shell Programming and Scripting
I have a file with three fields and field delimiter '|' like:
abc|12:13:45|123
xyz|12:87:32|
qwe|54:21:09
In the file the 1st line has proper data -> abc|12:13:45|123
,the 2nd line doesnt has data for the 3rd field which is okay
, the 3rd line doesnt has data for the 3rd field as well the... (5 Replies)
Discussion started by: mehimadri
5 Replies
8. UNIX for Advanced & Expert Users
Hello,
I had posted earlier about printing fields using AWK, but now I have a slightly different problem. I have text files in the format:
1*2,3,4,5
and wish to print the first, third, and fifth fields, including the asterisk and commas. In other words, after filtering it should look... (1 Reply)
Discussion started by: Jahn
1 Replies
9. Shell Programming and Scripting
Hi,
I have text file which contains lines like :
a/a/a/a/.project
b/b/b/b/b/.project
c/c/c/.project
d/.project
e/e/e/e/.project
i want for all lines the last word .project should be removed and the file should look like :
a/a/a/a/
b/b/b/b/b/
c/c/c/
....
how to proceed... (7 Replies)
Discussion started by: bhaskar_m
7 Replies
10. Shell Programming and Scripting
Hi,
I'm trying to insert double quotes right after the third delimiter in a file. Delimiter is ^Z.
For example:
Input:
Oct ^Z 1234 ^Z John ^Z Hello!"
Desired Output:
Oct ^Z 1234 ^Z John ^Z "Hello!"
Any ideas? (1 Reply)
Discussion started by: kangaroo
1 Replies