10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Under one of my directories on server I have more than 500 files with different type and name. When I run the find command to list the files with 'ABC_DEFGH' in the begining of its name and older than 20 days, nothing is return as result. Though I know there are more than 400 files which their name... (10 Replies)
Discussion started by: Home
10 Replies
2. Shell Programming and Scripting
Hello,
I have a file that I want to be able to insert a new line before every instance of a regex. I can get it to do this for each line that contains the regex, but not for each instance.
Contents of infile:
Test this 1...
Test this 2...
Test this 3... Test this 4... Test this... (2 Replies)
Discussion started by: deneuve01
2 Replies
3. Shell Programming and Scripting
I've got a report I need to make easier to read Using sh on HP-UX 11.12.
In short, I want to search for a regular expression and when found, examine the next line to see if it's blank. If so, then delete both lines. If not blank, move on to the next regexp. Repeat.
So far I've got:
... (7 Replies)
Discussion started by: Scottie1954
7 Replies
4. Shell Programming and Scripting
My script ssh's to another server and gathers information then process them. The problem is that the output of a command has an unwanted "blank lines".
...
ssh user1@${server1} /usr/bin/ls -l /tmp/file1 | awk '{print $5}' > ${DATAFILE}
...
$ cat ${DATAFILE}
123456789 (There's a blank... (7 Replies)
Discussion started by: pdtak
7 Replies
5. Shell Programming and Scripting
When I run this:
PDHDURL=`/usr/bin/curl --silent http://www.phdcomics.com/comics.php | /usr/bin/grep -o http://www.phdcomics.com/comics/archive/.*.gif | head -1`
echo -e "$PHDURL"
It is totally blank. However, when I just run it from the terminal:
/usr/bin/curl --silent... (2 Replies)
Discussion started by: killer54291
2 Replies
6. Shell Programming and Scripting
Hi
Is it possible to do the following in a single command
/usr/xpg4/bin/sed -e '/rows selected/d' /aemu/CALLAUTO/callauto.txt > /aemu/CALLAUTO/callautonew.txt
/usr/xpg4/bin/sed -e '/^$/d' /aemu/CALLAUTO/callautonew.txt > /aemu/CALLAUTO/callauto_new.txt
exit (1 Reply)
Discussion started by: aemunathan
1 Replies
7. Shell Programming and Scripting
Hi,
I would like to know how to solve one of my problems using expert unix commands.
I have a file with occasional blank lines;
for example;
dertu
frthu
fghtu
frtty
frtgy
frgtui
frgtu
ghrye
frhutp
frjuf
I need to edit the file so that the file looks like this; (10 Replies)
Discussion started by: Lucky Ali
10 Replies
8. Shell Programming and Scripting
Hello,
I actually have two issues. First, here is the file the way it is now.
someword someword:1
new-word new-word abcd
someword someword:10
new-word new-word abcd
thisis whatIneed:3
someword someword:5
new-word new-word abcd
I need to get the line before the 2... (6 Replies)
Discussion started by: ddrew78
6 Replies
9. UNIX for Dummies Questions & Answers
Hi guys.
I am trying, to move files found with the find command...
Script runs fine, until it reaches a file that contains spaces...
Here is what i wrote up quickly.
ROOTDIR=/apps/data
SEARCH=$(find /data/HDTMPRestore/home/tmq/ -type f -print | grep Mods/Input/bck | cut -c19-)
for i... (1 Reply)
Discussion started by: Stephan
1 Replies
10. Shell Programming and Scripting
Hi,
Please can you someone help me out to eliminate the problem. Here, it correctly prints the myFilenameCount but returns the first value of array myFilenamePatterns as blank.
Thanks,
Sudhakar
i=0
get_config_values_from_mediation_cfg "FILENAME_PATTERN"|while read myFilenamePatterns
do... (1 Reply)
Discussion started by: Sudhakar333
1 Replies