Problems with if statement
Hi guys..i'm totally new to linux shell scripting and i have written a simple script that allows to poll a directory and when there is at least one file, it is moved to another directory. But i have an...
View ArticleMake Utility Question
Hello, I'm a recent convert to UNIX and I'm attempting to understand exactly how the make utility is working under the hood. Now, I understand that each rule has a target, dependencies, and update...
View Article[solved] Where & what bash env file, Mac OS?
Hi! I wanted to simplify my bash prompt, so I edited my etc/bashrc file. I thought this was the file that would override any other env files. When I opened it, I saw that the way it was setup was not...
View ArticleCouple of questions wth grep/sort
I have different things that I was trying to do but am kind of struggling with this since I'm a Linux noob. The backround is that I have two files with student names in the same directory, and each...
View ArticleTest if script was ran w/ nohup
I want to test if script.sh is being run with nohup ... but $0 does not contain nohup part... purpose: script.sh should only be ran with nohup if user forgets nohup then it should echo "run with nohup"...
View ArticleFlapping (reconnecting) external USB drive
Hi gurus, during playing movie via VLC or SMPlayer I get several time the error that file cannot be read. File was stored on external USB disk. During this error I get another dialogue message that...
View Article[DD] Generating 512MB file using random data
Hello. Could anyone help me with my little annoying problem? I have to generate a 512 MB file made up with random data using DD. After some internet digging I found out that the command is: Code: dd...
View ArticleCurrent instance of Shell ignoring SIGTERM
Hello. Could anyone tell me how can I configure a instance of Shell to ignore the SIGTERM signal? I would really appreciate. Thanks.
View ArticleSolaris 10, GhostPDL , PCL to PDF , pcl6 core dump
I have compiled GhostPDL that provides a shell script pcl2pdf that calls the executable pcl6. pcl6 compiled with no errors using gmake and gcc. Running pcl2pdf generates a core dump when trying to...
View Articlesed data extract
Hello, I have huge number files in a directory. All files have the data. I want extract data. I want all output write to single csv file. following codes works. Thank you very much for help. sed -n...
View ArticleHow to convert multiple number ranges into sequence?
Looking for a simple way to convert ranges to a numerical sequence that would assign the original value of the range to the individual numbers that are on the range. Thank you Code: given data...
View ArticleReboot script issue
Hi guys I am troubleshooting a script that informs me when a system has rebooted. The script is placed in /etc/rc3.d folder under root. The script is as follows: Code: . /opt/scripts/function.sh...
View ArticleIs is possible to pass multiple entries in PS3 select ?
Code: PS3="Enter corresponding number and hit enter:" select DIR in `cat mylist` QUIT do if [ -z "$DIR" ] then echo "INVALID INPUT" else if [ -d "$mysource/$DIR" ]; then my commands ........
View ArticleHigh CPU utilization
Hi, i am observing few processes taking high CPU and when i got some more detials about them it looks like this Code: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 9452 xmp...
View ArticleIssue in SQL Loader scripts
Hi, I'm planning to load the data from FLAT files into tables. Source file: more input.txt Code:...
View ArticleAwk: cannot open file (No such file or directory)
Hello folks! I am new to Shell and awk scripting. This is my shell script that receives a string as an input from the user from the stdin. Code: #!bin/sh printf "Enter your query\n" read query...
View ArticleNeed help with user rights (Permission denied)
I have a script that do read data for Munin Graph . My problem is that it have some reading problems, and I do not know how to fix it. script traf.sh (its not the complete script) Code: #!/bin/sh...
View ArticleXmllint - Xml-file problem --ods file not opening
Dear All, this is my first post on this Forum, glad to be here. I'm trying to fix an .ods file. Yes, I had a backup, but it's also corrupted. When opening the document I get this EM: read error format...
View ArticleMatch columns and fetch whatever in front of it
Hi Solved these kind of issues using these codes But these are not wrking for my attached files can anybody check........ Code: awk 'NR==FNR{X[$1]++;next}{if(X[$1]){print}}' file1 file2 Code: awk...
View Articlesed script to parse logs issue
I have this script to parse some logs: Code: #!/bin/bash id=$1 shift sed "/(id=$id)/,/^$/!d" "$@" Usage: ./script.sh 1234 logfile The logs have an empty line before the logged events/timestamps -- most...
View Article