10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can I cut the date and leave it in 3 variable?
date="20181219"
year=substr(date,1,4)
monthsubstr(date,4,2)
daysubstr(date,6,2)
result
year=2018
month=12
day=19
this does not work for me (3 Replies)
Discussion started by: tricampeon81
3 Replies
2. UNIX for Dummies Questions & Answers
Hi Guys,
I have following different lines separated by multiple spaces. And i need to cut only the time part (16:53) from the string. How can we achieve it?
remedy 29210 1 1 07:55 ? 00:06:20 /opt/bmc/java/jre1.6.0_17/bin/java -Xms1024m -Xmx2048m -XX:MaxPermSize=1024m... (12 Replies)
Discussion started by: Khushbu
12 Replies
3. Shell Programming and Scripting
---------- Post updated at 10:31 AM ---------- Previous update was at 10:28 AM ----------
Hello,
I am trying to get the string cut based on the following needs:
String1=Submitted request 25574824 for CONCURRENT SQLAP RUAPACTUALSEXT Y RUAPACTUALS122313100616.dat "2013/01/12 14:50:44"... (6 Replies)
Discussion started by: cartrider
6 Replies
4. Shell Programming and Scripting
Hello All
I have a file like this
abc.tpt.ctl
bdc.tpt.ctl
cdw.tpt.ctl
I have looped every line using the for Loop, now I want to take each line and cut the .tpt.ctl part of it and store it in a variable and use the variable in same loop.
The part I am stuck at is how do I cut the last... (9 Replies)
Discussion started by: nnani
9 Replies
5. Shell Programming and Scripting
Hi in a directory i've files having the following name
for_category_info_19990101984301
for_catgry_meta_19991111214601
-------
I just want the name till year and month i.e;
for_category_info_199901
for_catgry_meta_199911
How can i achieve the above string
Thanks (2 Replies)
Discussion started by: smile689
2 Replies
6. UNIX for Dummies Questions & Answers
I want to cut column 1 to 5
echo $somevariable | cut -c 1-5
not working (6 Replies)
Discussion started by: ezee
6 Replies
7. Shell Programming and Scripting
I need only the last .ko files to be stripped from the whole result., ie libiscsi2.ko, scsi_transport_iscsi2.ko etc..
kernel/drivers/scsi/libiscsi2.ko
kernel/drivers/scsi/scsi_transport_iscsi2.ko
kernel/drivers/scsi/scsi_transport_iscsi.ko
kernel/fs/nls/nls_utf8.ko... (4 Replies)
Discussion started by: anilcliff
4 Replies
8. UNIX for Dummies Questions & Answers
I have a file:
chromosome1:436728
chromosome2:32892
.....
chromosome22:23781
I just want to get the number, not the prefix "chromosomeX", so I want to remove all the prefix ahead of the numbers. How can I do that?? Thanks!!! (PS: give me some very simple command so that I can understand... (4 Replies)
Discussion started by: kaixinsjtu
4 Replies
9. Shell Programming and Scripting
Hi...
I have a requrement to compare two files.
for e.g.
File 1
2007/08/19 09:48:10 DH-032 $APTA1: Device AATD8029
2007/08/19 09:48:10 DH-045 $APTA1: Device AATD8029
2007/08/19 09:48:10 DH-043 $APTA1: Device AATD8029
File 2
2007-08-19 09:48:10 DH-032... (1 Reply)
Discussion started by: evvander
1 Replies
10. Shell Programming and Scripting
Hello All,
Plz help me with:
I have a csv file with data separated by ',' and optionally enclosed by "". I want to check each of these values to see if they exceed the specified string length, and if they do I want to cut just that value to the max length allowed and keep the csv format as it... (9 Replies)
Discussion started by: ozzy80
9 Replies