10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have a file with following data.
{
EqName "Tan 1"
....
....
}
{
EqName "Sin 2"
...
...
}
I have to replace the value of EqName to Tan_1 and Sin_2 in file.Can i use sed or awk ?
cat file|grep EqName|awk '{print $2 $3}'|sed -i 's//_/g'
I tried with this but it... (2 Replies)
Discussion started by: Jag02
2 Replies
2. Shell Programming and Scripting
Hey,
So I'm having issues sorting a data set.
The data set contains entries as such;
# key: sex, time, athlete, athlete's nationality, date, city, country
M, 2:30:57.6, Harry Payne, GBR, 1929-07-05, Stamford Bridge, England
M, 2:5:42, Khalid Khannouchi, MAR, 1999-10-24, Chicago, USA
M,... (1 Reply)
Discussion started by: DNM_UKN
1 Replies
3. Shell Programming and Scripting
I am trying to use bash to remove the text in all filenames after the second _ in specific files that end in .bam or .vcf. However the bash errors looking for the files in the directory. Thank you :).
files in directory
... (4 Replies)
Discussion started by: cmccabe
4 Replies
4. Shell Programming and Scripting
Data files coming in different names in a file name called process.txt.
1. shipments_yyyymmdd.gz
2 Order_yyyymmdd.gz
3. Invoice_yyyymmdd.gz
4. globalorder_yyyymmdd.gz
The process needs to discard all the below files and only process two of the 4 file names available
... (1 Reply)
Discussion started by: dsravanam
1 Replies
5. Shell Programming and Scripting
Hi
I have some files in directory and the names of files are like
jnhld_15233_2010-11-23
jnhld_15233_2007-10-01
jnhld_15233_2001-05-04
jnhld_15233_2011-11-11
jnhld_15233_2005-06-07
jnhld_15233_2000-04-01
..etc
How can i sort these files based on the date in the file name so that ... (4 Replies)
Discussion started by: morbid_angel
4 Replies
6. Shell Programming and Scripting
If I call my function with grouped options: "logm -TDIWEFO 'message' ", then only the "T" gets parsed correctly. The subsequent values returned have underscores prefixed to the value: "_D", "_I", etc. If I "logm -T -DIWEFO 'message' ", the "T" and the "D" are OK, but "I" through "O" get the... (2 Replies)
Discussion started by: kchriste
2 Replies
7. Shell Programming and Scripting
Hi All,
I am not able to create any file name start with "-" hyphen. Any logical issue with these types of files creation in Solaris.
==============================
bash-3.00$ touch -file.txt
touch: illegal option -- i
usage: touch file...
touch ] file...
touch ... (5 Replies)
Discussion started by: hanu_oracle
5 Replies
8. Shell Programming and Scripting
Sun Solaris Unix Question
Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies
9. Shell Programming and Scripting
hi all,
is there an easy way in ksh to sort the results of a find in say alphabetical order ?? e.g in my script i am doing a find for all servers
find . -name "server.xml"
and the output is not in any order.
thanks in advance. (4 Replies)
Discussion started by: cesarNZ
4 Replies
10. Shell Programming and Scripting
I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves.
Also, the script should only move a file from /exports to... (6 Replies)
Discussion started by: nikosey
6 Replies