10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to run the awk below. My question is when I split the input, then run anotherawk to perform a calculation using that splitas the input there are no issues. When I try to combine them the output is not correct, is the split not working or did I do it wrong? Thank you :).
input
... (8 Replies)
Discussion started by: cmccabe
8 Replies
2. Shell Programming and Scripting
Hello, I want to run a field from an awk command through a command in bash.
For example my input file is
1,2,3
20,30,40
60,70,80
I want tot run $2 thought the command
date +%d/%m/%y -d"01/01/15 + $2 days -1 day"
and get the output
1,02/01/15,3
20,30/01/15,40
60,11/03/15,80
... (2 Replies)
Discussion started by: garethsays
2 Replies
3. Shell Programming and Scripting
Hi All,
I am looking to filter out filesystems which are greter than a specific value.
I use the command
df -h | awk '$4 >=70.00 {print $4,$5}'
But this results out as below, which also gives for lower values.
9% /u01
86% /home
8% /u01/data
82% /install
70% /u01/app
Looks... (3 Replies)
Discussion started by: jjoy
3 Replies
4. Shell Programming and Scripting
I have a result like this
root@server # grep -rl maldet /etc/cron*
/etc/cron.d/maldet_daily
/etc/cron.d/malcron
/etc/cron.d/malcrondaily
/etc/cron.d/malcronweekly
What I need is, I need an if/else condition such that, if there is any output other than /etc/cron.d/maldet_daily in the... (8 Replies)
Discussion started by: anil510
8 Replies
5. Shell Programming and Scripting
Hi,
There is an awk command in script and it is running successfully.
I want to split that command in 2 lines.
I have tried using '\' but its not working..
Please suggest me the solution. (11 Replies)
Discussion started by: Sanket Dalvi
11 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I have input file which is pipe delimited
A | 1
B | 2
c | 3I need output of displaying total number of lines in a file as last column.
A | 1 | 3-----total number of linesin file.
B | 2 | 3
c | 3 | 3 (9 Replies)
Discussion started by: pravinashwin
9 Replies
7. Shell Programming and Scripting
Hi Friends,
I have a file1
i want to retrieve only the fields which have DEP,CITY,TRANS as headers in other file.
Output:
I want to give the input as DEP,CITY,TRANS column names to get the output.
i used cut command .. but if i have 300 fileds it is more difficult to... (4 Replies)
Discussion started by: i150371485
4 Replies
8. Shell Programming and Scripting
awk 'FNR == 1 { c = 1 } { print > (f c) } !FNR%n { close(f c); ++c }' n=$files_per_stream f=$input_path/filename_ $input_file
$input_file with some records are splitted into files named filename_1,filename_2...etc according to $files_per_stream.
Plz help me know how and if anyone has... (7 Replies)
Discussion started by: guptam
7 Replies
9. Shell Programming and Scripting
Hi
I have few files with format access.2Nov-12:15AM.
These files will be generated daily . I need to write a script so that if today's date is less than 10 then it has to zip the file and rename it to
acess.02Nov-12:15AM.gz .please help me in this . Also please help me
in splitting the file... (10 Replies)
Discussion started by: mskalyani9
10 Replies
10. Shell Programming and Scripting
#!/bin/sh
#
##
MYSTRING = `awk '/myApp.app/' /Users/$USER/Library/Preferences/loginwindow.plist`
if
then
echo String not found
defaults write /Users/$USER/Library/Preferences/loginwindow AutoLaunchedApplicationDictionary -dict-add -string Hide -bool YES -string Path -string... (9 Replies)
Discussion started by: dedmakar
9 Replies