10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the string:
XXXX.YYYY_ZZZ.20180724.01.txt
I need to get rid of .txt and get full four parts
XXXX.YYYY_ZZZ.20180724.01
I did:
CTL=`echo XXXX.YYYY_ZZZ.20180724.01.txt | rev | cut -d"." -f4 | rev`
But got only YYYY_ZZZ
What should I do to get all four parts of that... (4 Replies)
Discussion started by: digioleg54
4 Replies
2. Shell Programming and Scripting
Hi Experts.
I'm stuck with the below AWK code where i'm trying to move the records containing any special characters in the last field to a bad file.
awk -F, '{if ($NF ~ /^|^/) print >"goodfile";else print >"badfile"}' filename
sample data
1,abc,def,1234,A *
2,bed,dec,342,* A ... (6 Replies)
Discussion started by: shell_boy23
6 Replies
3. Shell Programming and Scripting
Hi there,
I have an output from a command like this
# ypcat -k netgroup.byuser| grep steven
steven.* users_main,users_sysadmin,users_global,users_backup_team
and wanted to pull the 'users' netgroups returned into a perl array, that will look like this
users_main... (2 Replies)
Discussion started by: rethink
2 Replies
4. Shell Programming and Scripting
input
-200 2.4
0 2.6
30 2.8
output
-500 0
-499 0
-488 0
..........
..........
....
-200 2.4
....
...
0 2.6 (6 Replies)
Discussion started by: quincyjones
6 Replies
5. Shell Programming and Scripting
Input:
Debris Linux is a minimalist, desktop-oriented distribution and live CD based on Ubuntu.
It includes the GNOME desktop and a small set of popular desktop applications, such
as GNOME Office, Firefox web browser, Pidgin instant messenger, and ufw firewall manager.
Debris Linux ships... (5 Replies)
Discussion started by: cola
5 Replies
6. UNIX for Dummies Questions & Answers
I have an input file of this format
<Date><other data>
For example,
20081213aaaaaaaaa
20081213bbbbbbbbb
20081220ccccccccc
20081220ddddddddd
20081220eeeeeeeee
20081227ffffffffffffff
The first 8 chars are date in YYYYMMDD formT. I need to split this file into n files where n is the... (9 Replies)
Discussion started by: paruthiveeran
9 Replies
7. Shell Programming and Scripting
How do I split a file into many parts but with different amounts of lines per part? I looked at the split command but that only splits evenly.
I'd like a range specified to determine how many lines each output file should have.
For example, if the input file has 1000 lines and the range is... (1 Reply)
Discussion started by: revax
1 Replies
8. Shell Programming and Scripting
Hi all,
I want to split a string in awk and treat each component seperatley.
I know i can use:
split ("hi all", a, " ")
to put each delimited component into array a.
However when i want to do this with just a string of chars it does not work
split ("hi", a, "");
print a;
prints... (6 Replies)
Discussion started by: pxy2d1
6 Replies
9. Shell Programming and Scripting
Hi,
I need to split xml-files with sizes greater than 2 gb into smaler chunks. As I dont want to end up with billions of files, I want those splitted files to have configurable sizes like 250 MB. Each file should be well formed having an exact copy of the header (and footer as the closing of the... (0 Replies)
Discussion started by: Malapha
0 Replies
10. Programming
Good morning,
I would like to make a little interface for an application which will split the console in 2 "parts":
1 top area to print messages & 1 command prompt.
The printed messages are asynchronous to the command prompt, what I mean is that while while the user types a command a... (2 Replies)
Discussion started by: jonas.gabriel
2 Replies